From 149fe9ea8eac8e798f29308d3fb2076d9e91255b Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Tue, 22 Nov 2022 16:30:16 +0100 Subject: [PATCH] Synchronization between ICS and participants. --- .../src/components/conferenceInfo/ConferenceInfoModel.cpp | 1 + .../ui/modules/Linphone/Chat/ChatCalendarMessage.qml | 6 +++++- .../Linphone/Chat/ChatConferenceInvitationMessage.qml | 6 +++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp index b04ae22ba..0a8adb8b9 100644 --- a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp +++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp @@ -260,6 +260,7 @@ void ConferenceInfoModel::setDescription(const QString& description){ void ConferenceInfoModel::setParticipants(ParticipantListModel * participants){ mConferenceInfo->setParticipants(participants->getParticipants()); + emit participantsChanged(); } void ConferenceInfoModel::setTimeZoneModel(TimeZoneModel * model){ diff --git a/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml b/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml index e7022c1f3..61a34add5 100644 --- a/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml +++ b/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml @@ -212,7 +212,11 @@ Loader{ Layout.alignment: Qt.AlignTop spacing: 0 visible: mainItem.isExpanded - onVisibleChanged: model= mainItem.conferenceInfoModel.getParticipants() + onVisibleChanged: visible ? model= mainItem.conferenceInfoModel.getParticipants() : model = [] + Connections{ + target: mainItem.conferenceInfoModel + onParticipantsChanged: if(expandedParticipantsList.visible) expandedParticipantsList.model = mainItem.conferenceInfoModel.getParticipants() + } delegate: Row{ spacing: 5 diff --git a/linphone-app/ui/modules/Linphone/Chat/ChatConferenceInvitationMessage.qml b/linphone-app/ui/modules/Linphone/Chat/ChatConferenceInvitationMessage.qml index b17b651d1..cced32c2a 100644 --- a/linphone-app/ui/modules/Linphone/Chat/ChatConferenceInvitationMessage.qml +++ b/linphone-app/ui/modules/Linphone/Chat/ChatConferenceInvitationMessage.qml @@ -204,7 +204,11 @@ Loader{ Layout.leftMargin: 10 spacing: 0 visible: mainItem.isExpanded - onVisibleChanged: model= mainItem.conferenceInfoModel.getParticipants() + onVisibleChanged: visible ? model= mainItem.conferenceInfoModel.getParticipants() : model = [] + Connections{ + target: mainItem.conferenceInfoModel + onParticipantsChanged: if(expandedParticipantsList.visible) expandedParticipantsList.model = mainItem.conferenceInfoModel.getParticipants() + } delegate: Row{ spacing: 5