From 60dd37b6bf60b297d011e49c358525e32bbe798b Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Mon, 12 Jun 2017 16:25:47 +0200 Subject: [PATCH] fix(ui/modules/Linphone/Chat/FileMessage): use correct outgoing icons --- linphone-desktop/assets/images/chat_send.svg | 12 ------------ linphone-desktop/resources.qrc | 1 - .../ui/modules/Linphone/Chat/FileMessage.qml | 7 ++++++- .../ui/modules/Linphone/Chat/OutgoingMessage.qml | 4 ++-- 4 files changed, 8 insertions(+), 16 deletions(-) delete mode 100644 linphone-desktop/assets/images/chat_send.svg diff --git a/linphone-desktop/assets/images/chat_send.svg b/linphone-desktop/assets/images/chat_send.svg deleted file mode 100644 index 5406993eb..000000000 --- a/linphone-desktop/assets/images/chat_send.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - chat_send - Created with Sketch. - - - - - - - \ No newline at end of file diff --git a/linphone-desktop/resources.qrc b/linphone-desktop/resources.qrc index 70d76d021..74e1cde0d 100644 --- a/linphone-desktop/resources.qrc +++ b/linphone-desktop/resources.qrc @@ -63,7 +63,6 @@ assets/images/chat_normal.svg assets/images/chat_pressed.svg assets/images/chat_read.svg - assets/images/chat_send.svg assets/images/collapse.svg assets/images/contact_add_hovered.svg assets/images/contact_add_normal.svg diff --git a/linphone-desktop/ui/modules/Linphone/Chat/FileMessage.qml b/linphone-desktop/ui/modules/Linphone/Chat/FileMessage.qml index 7eb4aecac..d91fd5924 100644 --- a/linphone-desktop/ui/modules/Linphone/Chat/FileMessage.qml +++ b/linphone-desktop/ui/modules/Linphone/Chat/FileMessage.qml @@ -54,6 +54,8 @@ Row { ChatModel.MessageStatusNotDelivered ], $chatEntry.status) + readonly property bool isRead: $chatEntry.status === ChatModel.MessageStatusDisplayed + color: $chatEntry.isOutgoing ? ChatStyle.entry.message.outgoing.backgroundColor : ChatStyle.entry.message.incoming.backgroundColor @@ -200,7 +202,10 @@ Row { id: icon Icon { - icon: rectangle.isNotDelivered ? 'chat_error' : 'chat_send' + icon: rectangle.isNotDelivered + ? 'chat_error' + : (rectangle.isRead ? 'chat_read' : 'chat_delivered') + iconSize: ChatStyle.entry.message.outgoing.sendIconSize MouseArea { diff --git a/linphone-desktop/ui/modules/Linphone/Chat/OutgoingMessage.qml b/linphone-desktop/ui/modules/Linphone/Chat/OutgoingMessage.qml index 44d482252..c5e63a329 100644 --- a/linphone-desktop/ui/modules/Linphone/Chat/OutgoingMessage.qml +++ b/linphone-desktop/ui/modules/Linphone/Chat/OutgoingMessage.qml @@ -33,14 +33,14 @@ Item { id: icon Icon { - property bool isNotDelivered: Utils.includes([ + readonly property bool isNotDelivered: Utils.includes([ ChatModel.MessageStatusFileTransferError, ChatModel.MessageStatusIdle, ChatModel.MessageStatusInProgress, ChatModel.MessageStatusNotDelivered ], $chatEntry.status) - property bool isRead: $chatEntry.status === ChatModel.MessageStatusDisplayed + readonly property bool isRead: $chatEntry.status === ChatModel.MessageStatusDisplayed icon: isNotDelivered ? 'chat_error'