Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
23a8a904
Commit
23a8a904
authored
Jan 10, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ui/modules/Linphone/Chat/OutgoingMessage): display correctly status message
parent
264a31f6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
9 deletions
+33
-9
ChatModel.cpp
tests/src/components/chat/ChatModel.cpp
+2
-1
ChatModel.hpp
tests/src/components/chat/ChatModel.hpp
+5
-5
OutgoingMessage.qml
tests/ui/modules/Linphone/Chat/OutgoingMessage.qml
+26
-3
No files found.
tests/src/components/chat/ChatModel.cpp
View file @
23a8a904
...
@@ -56,7 +56,7 @@ private:
...
@@ -56,7 +56,7 @@ private:
if
(
it
==
chat
.
m_entries
.
end
())
if
(
it
==
chat
.
m_entries
.
end
())
return
;
return
;
(
*
it
).
first
[
"stat
e
"
]
=
state
;
(
*
it
).
first
[
"stat
us
"
]
=
state
;
int
row
=
distance
(
chat
.
m_entries
.
begin
(),
it
);
int
row
=
distance
(
chat
.
m_entries
.
begin
(),
it
);
emit
chat
.
dataChanged
(
chat
.
index
(
row
,
0
),
chat
.
index
(
row
,
0
));
emit
chat
.
dataChanged
(
chat
.
index
(
row
,
0
),
chat
.
index
(
row
,
0
));
...
@@ -251,6 +251,7 @@ void ChatModel::fillMessageEntry (
...
@@ -251,6 +251,7 @@ void ChatModel::fillMessageEntry (
dest
[
"timestamp"
]
=
QDateTime
::
fromMSecsSinceEpoch
(
static_cast
<
qint64
>
(
message
->
getTime
())
*
1000
);
dest
[
"timestamp"
]
=
QDateTime
::
fromMSecsSinceEpoch
(
static_cast
<
qint64
>
(
message
->
getTime
())
*
1000
);
dest
[
"content"
]
=
::
Utils
::
linphoneStringToQString
(
message
->
getText
());
dest
[
"content"
]
=
::
Utils
::
linphoneStringToQString
(
message
->
getText
());
dest
[
"isOutgoing"
]
=
message
->
isOutgoing
();
dest
[
"isOutgoing"
]
=
message
->
isOutgoing
();
dest
[
"status"
]
=
message
->
getState
();
}
}
void
ChatModel
::
fillCallStartEntry
(
void
ChatModel
::
fillCallStartEntry
(
...
...
tests/src/components/chat/ChatModel.hpp
View file @
23a8a904
...
@@ -41,13 +41,13 @@ public:
...
@@ -41,13 +41,13 @@ public:
Q_ENUM
(
CallStatus
);
Q_ENUM
(
CallStatus
);
enum
MessageStat
e
{
enum
MessageStat
us
{
MessageStat
e
Delivered
=
linphone
::
ChatMessageStateDelivered
,
MessageStat
us
Delivered
=
linphone
::
ChatMessageStateDelivered
,
MessageStat
e
InProgress
=
linphone
::
ChatMessageStateInProgress
,
MessageStat
us
InProgress
=
linphone
::
ChatMessageStateInProgress
,
MessageStat
e
NotDelivered
=
linphone
::
ChatMessageStateNotDelivered
MessageStat
us
NotDelivered
=
linphone
::
ChatMessageStateNotDelivered
};
};
Q_ENUM
(
MessageStat
e
);
Q_ENUM
(
MessageStat
us
);
ChatModel
(
QObject
*
parent
=
Q_NULLPTR
);
ChatModel
(
QObject
*
parent
=
Q_NULLPTR
);
~
ChatModel
()
=
default
;
~
ChatModel
()
=
default
;
...
...
tests/ui/modules/Linphone/Chat/OutgoingMessage.qml
View file @
23a8a904
import
QtQuick
2.7
import
QtQuick
2.7
import
QtQuick
.
Controls
1.4
import
QtQuick
.
Layouts
1.3
import
QtQuick
.
Layouts
1.3
import
Common
1.0
import
Common
1.0
...
@@ -27,10 +28,32 @@ Item {
...
@@ -27,10 +28,32 @@ Item {
Row
{
Row
{
spacing
:
ChatStyle
.
entry
.
message
.
extraContent
.
spacing
spacing
:
ChatStyle
.
entry
.
message
.
extraContent
.
spacing
Component
{
id
:
icon
Icon
{
Icon
{
height
:
ChatStyle
.
entry
.
lineHeight
icon
:
$chatEntry
.
status
===
ChatModel
.
MessageStatusNotDelivered
?
'
chat_error
'
:
'
chat_send
'
icon
:
'
chat_send
'
iconSize
:
ChatStyle
.
entry
.
message
.
outgoing
.
sendIconSize
iconSize
:
ChatStyle
.
entry
.
message
.
outgoing
.
sendIconSize
MouseArea
{
anchors.fill
:
parent
onClicked
:
console
.
log
(
'
resend
'
)
}
}
}
Component
{
id
:
indicator
BusyIndicator
{
width
:
ChatStyle
.
entry
.
message
.
outgoing
.
sendIconSize
}
}
Loader
{
height
:
ChatStyle
.
entry
.
lineHeight
sourceComponent
:
$chatEntry
.
status
===
ChatModel
.
MessageStatusInProgress
?
indicator
:
icon
}
}
ActionButton
{
ActionButton
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment