From c42d720c819be3a65069e8209467961485bfb2eb Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Thu, 4 May 2023 15:45:21 +0200 Subject: [PATCH] Calling conference from history. --- CHANGELOG.md | 1 + linphone-app/src/components/history/HistoryModel.cpp | 12 ++++++++---- linphone-app/ui/modules/Linphone/History/Event.qml | 4 ++-- linphone-app/ui/views/App/Main/HistoryView.qml | 7 ++++--- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 666f0ed48..6332e582e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Section date timezone in chat. - Use custom font for chat compose area. +- Calling conference from history. ## 5.0.15 - 2023-04-11 diff --git a/linphone-app/src/components/history/HistoryModel.cpp b/linphone-app/src/components/history/HistoryModel.cpp index 507135a5c..97446a073 100644 --- a/linphone-app/src/components/history/HistoryModel.cpp +++ b/linphone-app/src/components/history/HistoryModel.cpp @@ -53,9 +53,11 @@ static inline void fillCallStartEntry (QVariantMap &dest, const shared_ptrgetDir() == linphone::Call::Dir::Outgoing; dest["status"] = static_cast(callLog->getStatus()); dest["isStart"] = true; - if(callLog->getConferenceInfo()) + if(callLog->getConferenceInfo()){ dest["title"] = Utils::coreStringToAppString(callLog->getConferenceInfo()->getSubject()); - dest["sipAddress"] = Utils::coreStringToAppString(callLog->getRemoteAddress()->asString()); + dest["sipAddress"] = Utils::coreStringToAppString(callLog->getConferenceInfo()->getUri()->asString()); + }else + dest["sipAddress"] = Utils::coreStringToAppString(callLog->getRemoteAddress()->asString()); dest["callId"] = Utils::coreStringToAppString(callLog->getCallId()); dest["wasConference"] = callLog->wasConference(); } @@ -66,9 +68,11 @@ static inline void fillCallEndEntry (QVariantMap &dest, const shared_ptrgetDir() == linphone::Call::Dir::Outgoing; dest["status"] = static_cast(callLog->getStatus()); dest["isStart"] = false; - if(callLog->getConferenceInfo()) + if(callLog->getConferenceInfo()){ dest["title"] = Utils::coreStringToAppString(callLog->getConferenceInfo()->getSubject()); - dest["sipAddress"] = Utils::coreStringToAppString(callLog->getRemoteAddress()->asString()); + dest["sipAddress"] = Utils::coreStringToAppString(callLog->getConferenceInfo()->getUri()->asString()); + }else + dest["sipAddress"] = Utils::coreStringToAppString(callLog->getRemoteAddress()->asString()); dest["callId"] = Utils::coreStringToAppString(callLog->getCallId()); dest["wasConference"] = callLog->wasConference(); } diff --git a/linphone-app/ui/modules/Linphone/History/Event.qml b/linphone-app/ui/modules/Linphone/History/Event.qml index 4f1d4418f..6757577ae 100644 --- a/linphone-app/ui/modules/Linphone/History/Event.qml +++ b/linphone-app/ui/modules/Linphone/History/Event.qml @@ -138,8 +138,8 @@ Row { bold: true pointSize: HistoryStyle.entry.event.text.pointSize } - height: parent.height - text: $historyEntry.title + height: parent.height + text: $historyEntry && $historyEntry.title ? $historyEntry.title : _sipAddressObserver ? ( UtilsCpp.getDisplayName(_sipAddressObserver.peerAddress || $historyEntry.sipAddress) || _sipAddressObserver) diff --git a/linphone-app/ui/views/App/Main/HistoryView.qml b/linphone-app/ui/views/App/Main/HistoryView.qml index 5361edba4..2b67aff53 100644 --- a/linphone-app/ui/views/App/Main/HistoryView.qml +++ b/linphone-app/ui/views/App/Main/HistoryView.qml @@ -64,6 +64,7 @@ ColumnLayout { ? UtilsCpp.getDisplayName(historyView._sipAddressObserver.peerAddress) : null visible: peerAddress + isOneToOne: !historyView.entry || !historyView.entry.wasConference } ContactDescription { @@ -86,7 +87,7 @@ ColumnLayout { ActionBar { anchors.verticalCenter: parent.verticalCenter iconSize: HistoryViewStyle.bar.actions.call.iconSize - visible: historyView.entry ? !historyView.entry.wasConference : false + visible: historyView.entry || false ActionButton { isCustom: true @@ -110,7 +111,7 @@ ColumnLayout { backgroundRadius: 90 colorSet: HistoryViewStyle.chat - visible: peerAddress && SettingsModel.standardChatEnabled && SettingsModel.getShowStartChatButton() + visible: peerAddress && SettingsModel.standardChatEnabled && SettingsModel.getShowStartChatButton() && !historyView.entry.wasConference onClicked: CallsListModel.launchChat(historyView.peerAddress, 0) } @@ -118,7 +119,7 @@ ColumnLayout { isCustom: true backgroundRadius: 1000 colorSet: HistoryViewStyle.chat - visible: peerAddress && SettingsModel.secureChatEnabled && SettingsModel.getShowStartChatButton() + visible: peerAddress && SettingsModel.secureChatEnabled && SettingsModel.getShowStartChatButton() && !historyView.entry.wasConference onClicked: CallsListModel.launchChat(historyView.peerAddress, 1) Icon{ icon:'secure_level_1'