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
Hide 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:
if
(
it
==
chat
.
m_entries
.
end
())
return
;
(
*
it
).
first
[
"stat
e
"
]
=
state
;
(
*
it
).
first
[
"stat
us
"
]
=
state
;
int
row
=
distance
(
chat
.
m_entries
.
begin
(),
it
);
emit
chat
.
dataChanged
(
chat
.
index
(
row
,
0
),
chat
.
index
(
row
,
0
));
...
...
@@ -251,6 +251,7 @@ void ChatModel::fillMessageEntry (
dest
[
"timestamp"
]
=
QDateTime
::
fromMSecsSinceEpoch
(
static_cast
<
qint64
>
(
message
->
getTime
())
*
1000
);
dest
[
"content"
]
=
::
Utils
::
linphoneStringToQString
(
message
->
getText
());
dest
[
"isOutgoing"
]
=
message
->
isOutgoing
();
dest
[
"status"
]
=
message
->
getState
();
}
void
ChatModel
::
fillCallStartEntry
(
...
...
tests/src/components/chat/ChatModel.hpp
View file @
23a8a904
...
...
@@ -41,13 +41,13 @@ public:
Q_ENUM
(
CallStatus
);
enum
MessageStat
e
{
MessageStat
e
Delivered
=
linphone
::
ChatMessageStateDelivered
,
MessageStat
e
InProgress
=
linphone
::
ChatMessageStateInProgress
,
MessageStat
e
NotDelivered
=
linphone
::
ChatMessageStateNotDelivered
enum
MessageStat
us
{
MessageStat
us
Delivered
=
linphone
::
ChatMessageStateDelivered
,
MessageStat
us
InProgress
=
linphone
::
ChatMessageStateInProgress
,
MessageStat
us
NotDelivered
=
linphone
::
ChatMessageStateNotDelivered
};
Q_ENUM
(
MessageStat
e
);
Q_ENUM
(
MessageStat
us
);
ChatModel
(
QObject
*
parent
=
Q_NULLPTR
);
~
ChatModel
()
=
default
;
...
...
tests/ui/modules/Linphone/Chat/OutgoingMessage.qml
View file @
23a8a904
import
QtQuick
2.7
import
QtQuick
.
Controls
1.4
import
QtQuick
.
Layouts
1.3
import
Common
1.0
...
...
@@ -27,10 +28,32 @@ Item {
Row
{
spacing
:
ChatStyle
.
entry
.
message
.
extraContent
.
spacing
Icon
{
Component
{
id
:
icon
Icon
{
icon
:
$chatEntry
.
status
===
ChatModel
.
MessageStatusNotDelivered
?
'
chat_error
'
:
'
chat_send
'
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
icon
:
'
chat_send
'
iconSize
:
ChatStyle
.
entry
.
message
.
outgoing
.
sendIconSize
sourceComponent
:
$chatEntry
.
status
===
ChatModel
.
MessageStatusInProgress
?
indicator
:
icon
}
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