diff --git a/Linphone/core/call/CallCore.cpp b/Linphone/core/call/CallCore.cpp index 790cc04e8..3a223f66d 100644 --- a/Linphone/core/call/CallCore.cpp +++ b/Linphone/core/call/CallCore.cpp @@ -122,7 +122,12 @@ CallCore::CallCore(const std::shared_ptr &call) : QObject(nullpt mRemoteVideoEnabled = videoDirection == linphone::MediaDirection::SendOnly || videoDirection == linphone::MediaDirection::SendRecv; mState = LinphoneEnums::fromLinphone(call->getState()); - mPeerAddress = Utils::coreStringToAppString(call->getRemoteAddress()->asStringUriOnly()); + mRemoteAddress = Utils::coreStringToAppString(call->getRemoteAddress()->asStringUriOnly()); + auto linphoneFriend = ToolModel::findFriendByAddress(mRemoteAddress); + if (linphoneFriend) + mRemoteName = Utils::coreStringToAppString( + linphoneFriend->getVcard() ? linphoneFriend->getVcard()->getFullName() : linphoneFriend->getName()); + if (mRemoteName.isEmpty()) mRemoteName = ToolModel::getDisplayName(mRemoteAddress); mLocalAddress = Utils::coreStringToAppString(call->getCallLog()->getLocalAddress()->asStringUriOnly()); mStatus = LinphoneEnums::fromLinphone(call->getCallLog()->getStatus()); mTransferState = LinphoneEnums::fromLinphone(call->getTransferState()); @@ -454,8 +459,12 @@ void CallCore::setSelf(QSharedPointer me) { }); } -QString CallCore::getPeerAddress() const { - return mPeerAddress; +QString CallCore::getRemoteName() const { + return mRemoteName; +} + +QString CallCore::getRemoteAddress() const { + return mRemoteAddress; } QString CallCore::getLocalAddress() const { diff --git a/Linphone/core/call/CallCore.hpp b/Linphone/core/call/CallCore.hpp index 2ed1356ca..bf6ea9b83 100644 --- a/Linphone/core/call/CallCore.hpp +++ b/Linphone/core/call/CallCore.hpp @@ -95,7 +95,6 @@ public: class CallCore : public QObject, public AbstractObject { Q_OBJECT - // Q_PROPERTY(QString peerDisplayName MEMBER mPeerDisplayName) Q_PROPERTY(LinphoneEnums::CallStatus status READ getStatus NOTIFY statusChanged) Q_PROPERTY(LinphoneEnums::CallDir dir READ getDir NOTIFY dirChanged) Q_PROPERTY(LinphoneEnums::CallState state READ getState NOTIFY stateChanged) @@ -105,7 +104,8 @@ class CallCore : public QObject, public AbstractObject { Q_PROPERTY(bool speakerMuted READ getSpeakerMuted WRITE lSetSpeakerMuted NOTIFY speakerMutedChanged) Q_PROPERTY(bool microphoneMuted READ getMicrophoneMuted WRITE lSetMicrophoneMuted NOTIFY microphoneMutedChanged) Q_PROPERTY(bool paused READ getPaused WRITE lSetPaused NOTIFY pausedChanged) - Q_PROPERTY(QString peerAddress READ getPeerAddress CONSTANT) + Q_PROPERTY(QString remoteName READ getRemoteName CONSTANT) + Q_PROPERTY(QString remoteAddress READ getRemoteAddress CONSTANT) Q_PROPERTY(QString localAddress READ getLocalAddress CONSTANT) Q_PROPERTY(bool tokenVerified READ getTokenVerified WRITE setTokenVerified NOTIFY securityUpdated) Q_PROPERTY(bool isMismatch READ isMismatch WRITE setIsMismatch NOTIFY securityUpdated) @@ -144,7 +144,8 @@ public: ~CallCore(); void setSelf(QSharedPointer me); - QString getPeerAddress() const; + QString getRemoteName() const; + QString getRemoteAddress() const; QString getLocalAddress() const; LinphoneEnums::CallStatus getStatus() const; @@ -301,7 +302,7 @@ signals: Q_INVOKABLE void askForTransfer(); Q_INVOKABLE void askForAttendedTransfer(); Q_INVOKABLE bool transferTo(const QString &sipAddress); - Q_INVOKABLE bool transferToAnother(const QString &peerAddress); + Q_INVOKABLE bool transferToAnother(const QString &remoteAddress); Q_INVOKABLE bool getRemoteVideoEnabled() const; Q_INVOKABLE void acceptVideoRequest(); @@ -324,7 +325,8 @@ private: LinphoneEnums::MediaEncryption mEncryption; QString mLastErrorMessage; - QString mPeerAddress; + QString mRemoteName; + QString mRemoteAddress; QString mLocalAddress; bool mTokenVerified = false; bool mIsSecured = false; diff --git a/Linphone/core/call/CallProxy.cpp b/Linphone/core/call/CallProxy.cpp index 43140c0d0..8d6d61574 100644 --- a/Linphone/core/call/CallProxy.cpp +++ b/Linphone/core/call/CallProxy.cpp @@ -74,7 +74,7 @@ bool CallProxy::SortFilterList::filterAcceptsRow(int sourceRow, const QModelInde QRegularExpression::UseUnicodePropertiesOption); auto call = qobject_cast(sourceModel())->getAt(sourceRow); - show = call->getPeerAddress().contains(search); + show = call->getRemoteAddress().contains(search); } return show; @@ -84,5 +84,5 @@ bool CallProxy::SortFilterList::lessThan(const QModelIndex &sourceLeft, const QM auto l = getItemAtSource(sourceLeft.row()); auto r = getItemAtSource(sourceRight.row()); - return l->getPeerAddress() < r->getPeerAddress(); + return l->getRemoteAddress() < r->getRemoteAddress(); } diff --git a/Linphone/core/notifier/Notifier.cpp b/Linphone/core/notifier/Notifier.cpp index e7a2b7c44..6bfa7f506 100644 --- a/Linphone/core/notifier/Notifier.cpp +++ b/Linphone/core/notifier/Notifier.cpp @@ -329,8 +329,8 @@ void Notifier::notifyReceivedMessages(const listgetTimelineListModel()->getTimeline(chatRoom, true).get()); if (messages.size() == 1) { // Display only sender on mono message. - map["peerAddress"] = Utils::coreStringToAppString(message->getFromAddress()->asStringUriOnly()); - map["fullPeerAddress"] = Utils::coreStringToAppString(message->getFromAddress()->asString()); + map["remoteAddress"] = Utils::coreStringToAppString(message->getFromAddress()->asStringUriOnly()); + map["fullremoteAddress"] = Utils::coreStringToAppString(message->getFromAddress()->asString()); } map["localAddress"] = Utils::coreStringToAppString(message->getToAddress()->asStringUriOnly()); map["fullLocalAddress"] = Utils::coreStringToAppString(message->getToAddress()->asString()); @@ -381,8 +381,8 @@ void Notifier::notifyReceivedReactions( map["timelineModel"].setValue(timelineModel.get()); if (reactions.size() == 1) { // Display only sender on mono message. - map["peerAddress"] = Utils::coreStringToAppString(reaction.second->getFromAddress()->asStringUriOnly()); - map["fullPeerAddress"] = Utils::coreStringToAppString(reaction.second->getFromAddress()->asString()); + map["remoteAddress"] = Utils::coreStringToAppString(reaction.second->getFromAddress()->asStringUriOnly()); + map["fullremoteAddress"] = Utils::coreStringToAppString(reaction.second->getFromAddress()->asString()); } map["localAddress"] = Utils::coreStringToAppString(chatRoom->getLocalAddress()->asStringUriOnly()); map["fullLocalAddress"] = Utils::coreStringToAppString(chatRoom->getLocalAddress()->asString()); diff --git a/Linphone/core/participant/ParticipantProxy.cpp b/Linphone/core/participant/ParticipantProxy.cpp index 58bee96d5..6c53404f6 100644 --- a/Linphone/core/participant/ParticipantProxy.cpp +++ b/Linphone/core/participant/ParticipantProxy.cpp @@ -144,8 +144,8 @@ bool ParticipantProxy::SortFilterList::filterAcceptsRow(int sourceRow, const QMo } bool ParticipantProxy::SortFilterList::lessThan(const QModelIndex &left, const QModelIndex &right) const { - const ParticipantCore *a = sourceModel()->data(left).value(); - const ParticipantCore *b = sourceModel()->data(right).value(); + auto l = getItemAtSource(left.row()); + auto r = getItemAtSource(right.row()); - return a->getCreationTime() > b->getCreationTime() || b->isMe(); + return l->getCreationTime() > r->getCreationTime() || r->isMe(); } diff --git a/Linphone/model/tool/ToolModel.cpp b/Linphone/model/tool/ToolModel.cpp index 19537d024..bfd4db8c5 100644 --- a/Linphone/model/tool/ToolModel.cpp +++ b/Linphone/model/tool/ToolModel.cpp @@ -101,6 +101,13 @@ QString ToolModel::getDisplayName(QString address) { return nameSplitted.join(" "); } +std::shared_ptr ToolModel::findFriendByAddress(const QString &address) { + auto defaultFriendList = CoreModel::getInstance()->getCore()->getDefaultFriendList(); + if (!defaultFriendList) return nullptr; + auto linphoneAddr = ToolModel::interpretUrl(address); + return CoreModel::getInstance()->getCore()->findFriend(linphoneAddr); +} + bool ToolModel::createCall(const QString &sipAddress, const QVariantMap &options, const QString &prepareTransfertAddress, diff --git a/Linphone/model/tool/ToolModel.hpp b/Linphone/model/tool/ToolModel.hpp index ba5057e5f..9435ebf74 100644 --- a/Linphone/model/tool/ToolModel.hpp +++ b/Linphone/model/tool/ToolModel.hpp @@ -48,6 +48,8 @@ public: static QString getDisplayName(const std::shared_ptr &address); static QString getDisplayName(QString address); + static std::shared_ptr findFriendByAddress(const QString &address); + static bool createCall(const QString &sipAddress, const QVariantMap &options = {}, const QString &prepareTransfertAddress = "", diff --git a/Linphone/tool/Utils.cpp b/Linphone/tool/Utils.cpp index e8ce15d20..092f39169 100644 --- a/Linphone/tool/Utils.cpp +++ b/Linphone/tool/Utils.cpp @@ -363,10 +363,7 @@ VariantObject *Utils::findFriendByAddress(const QString &address) { VariantObject *data = new VariantObject(); if (!data) return nullptr; data->makeRequest([address]() { - auto defaultFriendList = CoreModel::getInstance()->getCore()->getDefaultFriendList(); - if (!defaultFriendList) return QVariant(); - auto linphoneAddr = ToolModel::interpretUrl(address); - auto linFriend = CoreModel::getInstance()->getCore()->findFriend(linphoneAddr); + auto linFriend = ToolModel::findFriendByAddress(address); if (!linFriend) return QVariant(); auto friendCore = FriendCore::create(linFriend); return QVariant::fromValue(new FriendGui(friendCore)); diff --git a/Linphone/view/Control/Container/Call/ActiveSpeakerLayout.qml b/Linphone/view/Control/Container/Call/ActiveSpeakerLayout.qml index bf68ee6fc..87afc37a2 100644 --- a/Linphone/view/Control/Container/Call/ActiveSpeakerLayout.qml +++ b/Linphone/view/Control/Container/Call/ActiveSpeakerLayout.qml @@ -95,7 +95,7 @@ Item{ textColor: DefaultStyle.main2_400 onClicked: { if (mainItem.conference) { - UtilsCpp.copyToClipboard(mainItem.call.core.peerAddress) + UtilsCpp.copyToClipboard(mainItem.call.core.remoteAddress) showInformationPopup(qsTr("Copié"), qsTr("Le lien de la réunion a été copié dans le presse-papier"), true) } } diff --git a/Linphone/view/Control/Container/Call/CallLayout.qml b/Linphone/view/Control/Container/Call/CallLayout.qml index be75d122c..c3825ac58 100644 --- a/Linphone/view/Control/Container/Call/CallLayout.qml +++ b/Linphone/view/Control/Container/Call/CallLayout.qml @@ -50,7 +50,7 @@ Item { ? qsTr("Vous avez terminé l'appel") : qsTr("Votre correspondant a terminé l'appel") : call.core.lastErrorMessage - : call.core.lastErrorMessage + : call && call.core.lastErrorMessage || "" color: DefaultStyle.grey_0 font { pixelSize: 22 * DefaultStyle.dp diff --git a/Linphone/view/Control/Container/Call/GridLayout.qml b/Linphone/view/Control/Container/Call/GridLayout.qml index b79677a45..30eace79e 100644 --- a/Linphone/view/Control/Container/Call/GridLayout.qml +++ b/Linphone/view/Control/Container/Call/GridLayout.qml @@ -46,7 +46,7 @@ Mosaic { displayAll: false displayPresence: false participantDevice: avatarCell.currentDevice - Component.onCompleted: console.log(qmlName + " is " +(call ? call.core.peerAddress : currentDevice ? currentDevice.core.address : 'addr_NotDefined')) + Component.onCompleted: console.log(qmlName + " is " +(call ? call.core.remoteAddress : currentDevice ? currentDevice.core.address : 'addr_NotDefined')) } } } diff --git a/Linphone/view/Control/Container/Contact/ContactLayout.qml b/Linphone/view/Control/Container/Contact/ContactLayout.qml index 7dd57fba3..c2c8eaec8 100644 --- a/Linphone/view/Control/Container/Contact/ContactLayout.qml +++ b/Linphone/view/Control/Container/Contact/ContactLayout.qml @@ -14,7 +14,13 @@ ColumnLayout { property ConferenceInfoGui conferenceInfo property bool isConference: conferenceInfo != undefined && conferenceInfo != null property string contactAddress: specificAddress != "" ? specificAddress : contact && contact.core.defaultAddress || "" - property string contactName: contact && contact.core.displayName || "" + property var computedContactNameObj: UtilsCpp.getDisplayName(contactAddress) + property string computedContactName: computedContactNameObj ? computedContactNameObj.value: "" + property string contactName: contact + ? contact.core.displayName + : conferenceInfo + ? conferenceInfo.core.subject + : computedContactName // Set this property to get the security informations // for a specific address and not for the entire contact @@ -60,14 +66,13 @@ ColumnLayout { Item { Layout.preferredWidth: 360 * DefaultStyle.dp Layout.preferredHeight: detailAvatar.height - // Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter Avatar { id: detailAvatar anchors.horizontalCenter: parent.horizontalCenter width: 100 * DefaultStyle.dp height: 100 * DefaultStyle.dp - contact: mainItem.specificAddress == "" ? mainItem.contact : null + contact: mainItem.contact || null _address: mainItem.conferenceInfo ? mainItem.conferenceInfo.core.subject : mainItem.contactAddress || mainItem.contactName @@ -85,11 +90,11 @@ ColumnLayout { Layout.alignment: Qt.AlignHCenter Layout.preferredWidth: 360 * DefaultStyle.dp spacing: 2 * DefaultStyle.dp + Text { + Layout.preferredWidth: implicitWidth Layout.alignment: Qt.AlignHCenter - Layout.fillWidth: true horizontalAlignment: Text.AlignHCenter - wrapMode: Text.WrapAnywhere elide: Text.ElideRight text: mainItem.contactName maximumLineCount: 1 @@ -116,6 +121,7 @@ ColumnLayout { property var mode : contact ? contact.core.consolidatedPresence : -1 Layout.alignment: Qt.AlignHCenter horizontalAlignment: Text.AlignHCenter + Layout.fillWidth: true visible: mainItem.contact text: mode === LinphoneEnums.ConsolidatedPresence.Online ? qsTr("En ligne") diff --git a/Linphone/view/Control/Display/Contact/Avatar.qml b/Linphone/view/Control/Display/Contact/Avatar.qml index dd58c5c5c..e77ed39b5 100644 --- a/Linphone/view/Control/Display/Contact/Avatar.qml +++ b/Linphone/view/Control/Display/Contact/Avatar.qml @@ -16,15 +16,19 @@ Loader{ property FriendGui contact: null property CallGui call: null property string _address: account - ? account.core?.identityAddress || "" - : call - ? call.core.peerAddress - : contact - ? contact.core.defaultAddress - : '' + ? account.core?.identityAddress || "" + : call + ? call.core.remoteAddress + : contact + ? contact.core.defaultAddress + : '' readonly property string address: SettingsCpp.onlyDisplaySipUriUsername ? UtilsCpp.getUsername(_address) : _address property var displayNameObj: UtilsCpp.getDisplayName(_address) - property string displayNameVal: displayNameObj ? displayNameObj.value : "" + property string displayNameVal: contact + ? contact.core.displayName + : displayNameObj + ? displayNameObj.value + : "" property bool haveAvatar: (account && account.core?.pictureUri || false) || (contact && contact.core.pictureUri) || computedAvatarUri.length != 0 diff --git a/Linphone/view/Control/Display/Sticker.qml b/Linphone/view/Control/Display/Sticker.qml index 64f652b7f..5f2c07cb1 100644 --- a/Linphone/view/Control/Display/Sticker.qml +++ b/Linphone/view/Control/Display/Sticker.qml @@ -30,15 +30,28 @@ Item { : previewEnabled ? callState === LinphoneEnums.CallState.Paused : callState === LinphoneEnums.CallState.PausedByRemote - property var peerAddressObj: previewEnabled && (call || account) - ? UtilsCpp.getDisplayName(account ? account.core.identityAddress : call.core.localAddress) - : participantDevice && participantDevice.core - ? UtilsCpp.getDisplayName(participantDevice.core.address) - : !previewEnabled && call && call.core - ? UtilsCpp.getDisplayName(call.core.peerAddress) - : null - - property string peerAddress:peerAddressObj ? peerAddressObj.value : "" + + property string remoteAddress: account + ? account.core.identityAddress + : participantDevice + ? participantDevice.core.address + : call + ? call.core.remoteAddress + : "" + property var localNameObj: previewEnabled && call + ? UtilsCpp.getDisplayName(call.core.localAddress) + : null + property string localName: localNameObj ? localNameObj.value : "" + property string displayName: account + ? account.core.displayName + : participantDevice + ? participantDevice.core.displayName + : call + ? previewEnabled + ? localName + : call.core.remoteName + : "" + property var identityAddress: account ? UtilsCpp.getDisplayName(account.core.identityAddress) : null property bool videoEnabled: (previewEnabled && call && call.core.localVideoEnabled) || (participantDevice && participantDevice.core.videoEnabled) @@ -87,7 +100,7 @@ Item { } Text { id: waitingTime - property var isMeObj: UtilsCpp.isMe(mainItem.peerAddress) + property var isMeObj: UtilsCpp.isMe(mainItem.remoteAddress) visible: isMeObj ? !isMeObj.value : false property int seconds text: UtilsCpp.formatElapsedTime(seconds) @@ -118,7 +131,7 @@ Item { visible: !joiningView.visible account: mainItem.account call: !mainItem.previewEnabled ? mainItem.call : null - _address: mainItem.peerAddress + displayNameVal: mainItem.displayName } ColumnLayout{ id: joiningView @@ -176,7 +189,7 @@ Item { Text { Layout.fillWidth: true horizontalAlignment: Text.AlignHCenter - text: mainItem.peerAddress + text: mainItem.displayName color: DefaultStyle.grey_0 font { pixelSize: 22 * DefaultStyle.dp @@ -187,7 +200,7 @@ Item { Text { Layout.fillWidth: true horizontalAlignment: Text.AlignHCenter - property string _text: mainItem.call && mainItem.call.core.peerAddress + property string _text: mainItem.call && mainItem.call.core.remoteAddress text: SettingsCpp.onlyDisplaySipUriUsername ? UtilsCpp.getUsername(_text) : _text color: DefaultStyle.grey_0 font { @@ -258,8 +271,8 @@ Item { anchors.leftMargin: 10 * DefaultStyle.dp anchors.bottomMargin: 10 * DefaultStyle.dp width: implicitWidth - property string _text: mainItem.peerAddress != '' - ? mainItem.peerAddress + property string _text: mainItem.displayName != '' + ? mainItem.displayName : mainItem.account && mainItem.identityAddress ? mainItem.identityAddress.value : "" diff --git a/Linphone/view/Control/Popup/Notification/NotificationReceivedCall.qml b/Linphone/view/Control/Popup/Notification/NotificationReceivedCall.qml index e5699fc58..48337e002 100644 --- a/Linphone/view/Control/Popup/Notification/NotificationReceivedCall.qml +++ b/Linphone/view/Control/Popup/Notification/NotificationReceivedCall.qml @@ -48,7 +48,7 @@ Notification { } ColumnLayout { Text { - property var remoteAddress: UtilsCpp.getDisplayName(call.core.peerAddress) + property var remoteAddress: UtilsCpp.getDisplayName(call.core.remoteAddress) text: remoteAddress ? remoteAddress.value : "" color: DefaultStyle.grey_600 font { @@ -67,7 +67,7 @@ Notification { Text { Layout.fillWidth: true property var localAddress: UtilsCpp.getDisplayName(call.core.localAddress) - text: qsTr("Appel entrant")//.arg(localAddress ? qsTr(" pour %1").arg(localAddress.value) : "") //call.core.peerAddress + text: qsTr("Appel entrant")//.arg(localAddress ? qsTr(" pour %1").arg(localAddress.value) : "") //call.core.remoteAddress color: DefaultStyle.grey_600 font { pixelSize: 13 * DefaultStyle.dp diff --git a/Linphone/view/Control/Tool/Prototype/CallPrototype.qml b/Linphone/view/Control/Tool/Prototype/CallPrototype.qml index 6b0d5d38a..39a11b77f 100644 --- a/Linphone/view/Control/Tool/Prototype/CallPrototype.qml +++ b/Linphone/view/Control/Tool/Prototype/CallPrototype.qml @@ -50,7 +50,7 @@ Window { Text{ id: addressText anchors.fill: parent - text: modelData.core.peerAddress + text: modelData.core.remoteAddress onTextChanged: console.log(addressText.text) Component.onCompleted: console.log(addressText.text) } diff --git a/Linphone/view/Page/Layout/Main/MainLayout.qml b/Linphone/view/Page/Layout/Main/MainLayout.qml index 86460555b..135a23902 100644 --- a/Linphone/view/Page/Layout/Main/MainLayout.qml +++ b/Linphone/view/Page/Layout/Main/MainLayout.qml @@ -90,13 +90,12 @@ Item { x: mainItem.width/2 - width/2 y: contentItem.height/2 property var currentCall: callsModel.currentCall ? callsModel.currentCall : null - property var peerNameObj: currentCall ? UtilsCpp.getDisplayName(currentCall.core.peerAddress) : null - property string peerName:peerNameObj ? peerNameObj.value : "" + property string remoteName: currentCall ? currentCall.core.remoteName : "" contentItem: Button { text: currentCallNotif.currentCall ? currentCallNotif.currentCall.core.conference ? ("Réunion en cours : ") + currentCallNotif.currentCall.core.conference.core.subject - : (("Appel en cours : ") + currentCallNotif.peerName) : "appel en cours" + : (("Appel en cours : ") + currentCallNotif.remoteName) : "appel en cours" color: DefaultStyle.success_500main onClicked: { var callsWindow = UtilsCpp.getCallsWindow(currentCallNotif.currentCall) diff --git a/Linphone/view/Page/Main/Call/CallPage.qml b/Linphone/view/Page/Main/Call/CallPage.qml index cf86618b9..8c67e1e22 100644 --- a/Linphone/view/Page/Main/Call/CallPage.qml +++ b/Linphone/view/Page/Main/Call/CallPage.qml @@ -283,6 +283,8 @@ AbstractMainPage { spacing: 10 * DefaultStyle.dp Avatar { id: historyAvatar + property var contactObj: UtilsCpp.findFriendByAddress(modelData.core.remoteAddress) + contact: contactObj && contactObj.value || null _address: modelData.core.remoteAddress width: 45 * DefaultStyle.dp height: 45 * DefaultStyle.dp @@ -662,7 +664,6 @@ AbstractMainPage { contact: contactObj && contactObj.value || null conferenceInfo: mainItem.selectedRowHistoryGui && mainItem.selectedRowHistoryGui.core.conferenceInfo || null specificAddress: mainItem.selectedRowHistoryGui && mainItem.selectedRowHistoryGui.core.remoteAddress || "" - contactName: mainItem.selectedRowHistoryGui ? mainItem.selectedRowHistoryGui.core.displayName : "" buttonContent: PopupButton { id: detailOptions diff --git a/Linphone/view/Page/Window/Call/CallsWindow.qml b/Linphone/view/Page/Window/Call/CallsWindow.qml index 53c8931d1..2ce0c8472 100644 --- a/Linphone/view/Page/Window/Call/CallsWindow.qml +++ b/Linphone/view/Page/Window/Call/CallsWindow.qml @@ -59,6 +59,7 @@ AbstractWindow { close.accepted = false terminateAllCallsDialog.open() } + if (middleItemStackView.currentItem.objectName === "waitingRoom") middleItemStackView.replace(inCallItem) } function changeLayout(layoutIndex) { @@ -340,12 +341,9 @@ AbstractWindow { } Text { id: callStatusText - property var remoteNameObj: mainWindow.call ? UtilsCpp.getDisplayName(mainWindow.call.core.peerAddress) : null - property string remoteName: remoteNameObj - ? mainWindow.callState === LinphoneEnums.CallState.Connected || mainWindow.callState === LinphoneEnums.CallState.StreamsRunning - ? remoteNameObj.value - : EnumsToStringCpp.dirToString(mainWindow.call.core.dir) + qsTr(" call") - : "" + property string remoteName: mainWindow.callState === LinphoneEnums.CallState.Connected || mainWindow.callState === LinphoneEnums.CallState.StreamsRunning + ? mainWindow.call.core.remoteName + : EnumsToStringCpp.dirToString(mainWindow.call.core.dir) + qsTr(" call") text: (mainWindow.callState === LinphoneEnums.CallState.End || mainWindow.callState === LinphoneEnums.CallState.Released) ? qsTr("Fin d'appel") : mainWindow.call && (mainWindow.call.core.paused @@ -816,13 +814,13 @@ AbstractWindow { spacing: 0 Avatar { id: delegateAvatar - _address: modelData.core.peerAddress + _address: modelData.core.remoteAddress Layout.preferredWidth: 45 * DefaultStyle.dp Layout.preferredHeight: 45 * DefaultStyle.dp } Text { id: delegateName - property var remoteAddress: UtilsCpp.getDisplayName(modelData.core.peerAddress) + property var remoteAddress: UtilsCpp.getDisplayName(modelData.core.remoteAddress) text: modelData.core.isConference ? modelData.core.conference.core.subject : remoteAddress ? remoteAddress.value : "" @@ -1006,7 +1004,7 @@ AbstractWindow { } } onClicked: { - UtilsCpp.copyToClipboard(mainWindow.call.core.peerAddress) + UtilsCpp.copyToClipboard(mainWindow.call.core.remoteAddress) showInformationPopup(qsTr("Copié"), qsTr("Le lien de la réunion a été copié dans le presse-papier"), true) } } @@ -1558,7 +1556,6 @@ AbstractWindow { id: participantListButton visible: mainWindow.conference iconUrl: AppIcons.usersTwo - checked: rightPanel.visible && rightPanel.currentItem?.objectName == "participantListPanel" checkedColor: DefaultStyle.main2_400 Layout.preferredWidth: 55 * DefaultStyle.dp Layout.preferredHeight: 55 * DefaultStyle.dp @@ -1572,6 +1569,10 @@ AbstractWindow { rightPanel.visible = false } } + Connections { + target: rightPanel + onVisibleChanged: if (!rightPanel.visible) participantListButton.checked = false + } } PopupButton { id: moreOptionsButton