From 2df3f0fd60bcdb47715ce5cfcab447b795bfe09e Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Thu, 4 May 2023 15:50:19 +0200 Subject: [PATCH] Calling conference from history. --- CHANGELOG.md | 2 ++ 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, 16 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c5d90aa1..00f09494e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,8 @@ 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 24be4ab80..e4be1e0c7 100644 --- a/linphone-app/src/components/history/HistoryModel.cpp +++ b/linphone-app/src/components/history/HistoryModel.cpp @@ -51,9 +51,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(); } @@ -68,9 +70,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 5e301380d..71ddb446e 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 239793a35..fd6947fdd 100644 --- a/linphone-app/ui/views/App/Main/HistoryView.qml +++ b/linphone-app/ui/views/App/Main/HistoryView.qml @@ -67,6 +67,7 @@ ColumnLayout { ? UtilsCpp.getDisplayName(historyView._sipAddressObserver.peerAddress) : null visible: peerAddress + isOneToOne: !historyView.entry || !historyView.entry.wasConference } ContactDescription { @@ -89,7 +90,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 @@ -113,7 +114,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) } @@ -121,7 +122,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'