From 3be835d378e1e980f0116c984413798ddac54cea Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Fri, 21 Jan 2022 17:33:42 +0100 Subject: [PATCH] Fix some qml errors on contacts and chats --- linphone-app/ui/modules/Linphone/Chat/Chat.qml | 8 ++++---- linphone-app/ui/modules/Linphone/Contact/Contact.qml | 2 +- linphone-sdk | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/linphone-app/ui/modules/Linphone/Chat/Chat.qml b/linphone-app/ui/modules/Linphone/Chat/Chat.qml index 05651ff3b..6fc36cb0a 100644 --- a/linphone-app/ui/modules/Linphone/Chat/Chat.qml +++ b/linphone-app/ui/modules/Linphone/Chat/Chat.qml @@ -300,16 +300,16 @@ Rectangle { width: parent.width Text { id: composersItem - property var composers : container.proxyModel.chatRoomModel.composers + property var composers : container.proxyModel.chatRoomModel && container.proxyModel.chatRoomModel.composers color: ChatStyle.composingText.color font.pointSize: ChatStyle.composingText.pointSize height: visible ? undefined : 0 leftPadding: ChatStyle.composingText.leftPadding - visible: composers.length > 0 && ( (!proxyModel.chatRoomModel.haveEncryption && SettingsModel.standardChatEnabled) + visible: composers && composers.length > 0 && ( (!proxyModel.chatRoomModel.haveEncryption && SettingsModel.standardChatEnabled) || (proxyModel.chatRoomModel.haveEncryption && SettingsModel.secureChatEnabled) ) wrapMode: Text.Wrap //: '%1 is typing...' indicate that someone is composing in chat - text:(composers.length==0?'': qsTr('chatTyping','',composers.length).arg(container.proxyModel.getDisplayNameComposers())) + text:(!composers || composers.length==0?'': qsTr('chatTyping','',composers.length).arg(container.proxyModel.getDisplayNameComposers())) } } @@ -344,7 +344,7 @@ Rectangle { anchors.bottom: parent.top anchors.bottomMargin: -5 anchors.leftMargin: -5 - count: container.proxyModel.chatRoomModel.unreadMessagesCount + count: container.proxyModel.chatRoomModel ? container.proxyModel.chatRoomModel.unreadMessagesCount : 0 } } diff --git a/linphone-app/ui/modules/Linphone/Contact/Contact.qml b/linphone-app/ui/modules/Linphone/Contact/Contact.qml index fb996b8ae..bea9e8e51 100644 --- a/linphone-app/ui/modules/Linphone/Contact/Contact.qml +++ b/linphone-app/ui/modules/Linphone/Contact/Contact.qml @@ -134,7 +134,7 @@ Rectangle { Layout.alignment: Qt.AlignTop count: entry?Number(entry.unreadMessagesCount) + Number(entry.missedCallsCount):0 - isComposing: Boolean(entry && entry.isComposing) + isComposing: Boolean(entry && entry.composers && entry.composers.length > 0) visible: entry?(entry.unreadMessagesCount !== null || entry.missedCallsCount !== null) && item.displayUnreadMessageCount:false } diff --git a/linphone-sdk b/linphone-sdk index 21c354aaf..938bcf6d2 160000 --- a/linphone-sdk +++ b/linphone-sdk @@ -1 +1 @@ -Subproject commit 21c354aaf1c6e39797840bc79a1f60aa70dd6a49 +Subproject commit 938bcf6d288eba2ff430165fe3da22f8cde9d42e