From f405754e247d5fdc15676bcb360b364e26410abf Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Fri, 28 Nov 2025 12:12:00 +0100 Subject: [PATCH] FIXES: auto switch to away/online status when app is inactive/active #LINQT-2172 fix loading ui for chats/meetings lists use uri only for account uris to remove the < and > --- Linphone/core/App.cpp | 40 ++++++++++++- Linphone/core/App.hpp | 4 +- Linphone/core/call/CallCore.cpp | 2 +- Linphone/data/languages/de.ts | 56 +++++++++---------- Linphone/data/languages/en.ts | 56 +++++++++---------- Linphone/data/languages/fr.ts | 56 +++++++++---------- Linphone/model/account/AccountModel.cpp | 10 ++-- Linphone/tool/Utils.cpp | 12 ++-- Linphone/tool/Utils.hpp | 2 +- .../Container/Call/CallHistoryLayout.qml | 2 +- .../Display/Call/CallHistoryListView.qml | 2 +- .../Chat/ChatMessageInvitationBubble.qml | 2 +- .../Display/Meeting/MeetingListView.qml | 7 +-- Linphone/view/Page/Layout/Main/MainLayout.qml | 2 +- Linphone/view/Page/Main/Chat/ChatPage.qml | 3 +- .../view/Page/Main/Meeting/MeetingPage.qml | 2 +- Linphone/view/Page/Window/AbstractWindow.qml | 4 +- .../view/Page/Window/Call/CallsWindow.qml | 8 +-- 18 files changed, 154 insertions(+), 116 deletions(-) diff --git a/Linphone/core/App.cpp b/Linphone/core/App.cpp index 41874cf77..ab289a4ee 100644 --- a/Linphone/core/App.cpp +++ b/Linphone/core/App.cpp @@ -335,7 +335,7 @@ void App::setSelf(QSharedPointer(me)) { auto callCore = CallCore::create(call); mCoreModelConnection->invokeToCore([this, callCore] { auto callGui = new CallGui(callCore); - auto win = getCallsWindow(QVariant::fromValue(callGui)); + auto win = getOrCreateCallsWindow(QVariant::fromValue(callGui)); Utils::smartShowWindow(win); auto mainwin = getMainWindow(); QMetaObject::invokeMethod(mainwin, "callCreated"); @@ -1068,7 +1068,39 @@ bool App::notify(QObject *receiver, QEvent *event) { return done; } -QQuickWindow *App::getCallsWindow(QVariant callGui) { +void App::handleAppActivity() { + auto handle = [this](AccountGui *currentAcount) { + auto accountCore = currentAcount->mCore; + Q_ASSERT(accountCore); + auto accountPresence = accountCore->getPresence(); + if ((mMainWindow && mMainWindow->isActive() || (mCallsWindow && mCallsWindow->isActive())) && + accountPresence == LinphoneEnums::Presence::Away) + accountCore->lSetPresence(LinphoneEnums::Presence::Online); + if (((!mMainWindow || !mMainWindow->isActive()) && (!mCallsWindow || !mCallsWindow->isActive())) && + accountPresence == LinphoneEnums::Presence::Online) + accountCore->lSetPresence(LinphoneEnums::Presence::Away); + }; + if (mAccountList) { + if (mAccountList->getDefaultAccount()) { + handle(mAccountList->getDefaultAccount()); + } else { + connect( + mAccountList.get(), &AccountList::defaultAccountChanged, this, + [this, handle] { + if (mAccountList->getDefaultAccount()) { + handle(mAccountList->getDefaultAccount()); + } + }, + Qt::SingleShotConnection); + } + } +} + +QQuickWindow *App::getCallsWindow() { + return mCallsWindow; +} + +QQuickWindow *App::getOrCreateCallsWindow(QVariant callGui) { mustBeInMainThread(getClassName()); if (!mCallsWindow) { const QUrl callUrl("qrc:/qt/qml/Linphone/view/Page/Window/Call/CallsWindow.qml"); @@ -1103,6 +1135,7 @@ QQuickWindow *App::getCallsWindow(QVariant callGui) { } // window->setParent(mMainWindow); mCallsWindow = window; + connect(mCallsWindow, &QQuickWindow::activeChanged, this, &App::handleAppActivity); } if (!callGui.isNull() && callGui.isValid()) mCallsWindow->setProperty("call", callGui); return mCallsWindow; @@ -1125,8 +1158,11 @@ QQuickWindow *App::getMainWindow() const { } void App::setMainWindow(QQuickWindow *data) { + if (mMainWindow) disconnect(mMainWindow, &QQuickWindow::activeChanged, this, nullptr); if (mMainWindow != data) { mMainWindow = data; + connect(mMainWindow, &QQuickWindow::activeChanged, this, &App::handleAppActivity); + handleAppActivity(); emit mainWindowChanged(); } } diff --git a/Linphone/core/App.hpp b/Linphone/core/App.hpp index 7d3dc378f..a18387e21 100644 --- a/Linphone/core/App.hpp +++ b/Linphone/core/App.hpp @@ -139,7 +139,9 @@ public: bool getCoreStarted() const; void setCoreStarted(bool started); - QQuickWindow *getCallsWindow(QVariant callGui = QVariant()); + QQuickWindow *getCallsWindow(); + Q_INVOKABLE void handleAppActivity(); + QQuickWindow *getOrCreateCallsWindow(QVariant callGui = QVariant()); void setCallsWindowProperty(const char *id, QVariant property); void closeCallsWindow(); diff --git a/Linphone/core/call/CallCore.cpp b/Linphone/core/call/CallCore.cpp index 8a15f4800..0ba88c459 100644 --- a/Linphone/core/call/CallCore.cpp +++ b/Linphone/core/call/CallCore.cpp @@ -213,7 +213,7 @@ void CallCore::setSelf(QSharedPointer me) { Utils::showInformationPopup(tr("call_record_end_message"), //: "L'appel a été enregistré dans le fichier : %1" tr("call_record_saved_in_file_message").arg(recordFile), true, - App::getInstance()->getCallsWindow()); + App::getInstance()->getOrCreateCallsWindow()); } }); }); diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index a1e94b59b..03f5685f0 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -25,13 +25,13 @@ AbstractWindow - + contact_dialog_pick_phone_number_or_sip_address_title "Choisissez un numéro ou adresse SIP" Telefonnummer oder SIP-Adresse wählen - + fps_counter %1 FPS @@ -752,30 +752,30 @@ Nur Anwendungs-Logs ausgeben - + hide_action "Cacher" "Afficher" Ausblenden - + show_action Zeigen - + quit_action "Quitter" Beenden - + check_for_update Check for update - + mark_all_read_action @@ -2529,74 +2529,74 @@ Error - + chat_dialog_delete_chat_title Supprimer la conversation ? - + chat_dialog_delete_chat_message "La conversation et tous ses messages seront supprimés." - + chat_list_title "Conversations" Konversationen - + menu_mark_all_as_read "mark all as read" - + chat_search_in_history "Rechercher une conversation" - + list_filter_no_result_found "Aucun résultat…" Kein Ergebnis… - + chat_list_empty_history "Aucune conversation dans votre historique" - + chat_action_start_new_chat "New chat" - + chat_start_group_chat_title "Nouveau groupe" - + chat_action_start_group_chat "Créer" Erstellen - - - + + + information_popup_error_title Fehler - + information_popup_chat_creation_failed_message "La création a échoué" @@ -2607,25 +2607,25 @@ Error Der Codec konnte nicht installiert werden. - + group_chat_error_must_have_name "Un nom doit être donné au groupe - + group_chat_error_no_participant "Please select at least one participant - + group_call_error_not_connected "Vous n'etes pas connecté" Sie sind nicht verbunden - + chat_creation_in_progress Creation de la conversation en cours … @@ -4606,19 +4606,19 @@ Error MeetingListView - + meeting_info_cancelled "Réunion annulée" Besprechung abgesagt - + meetings_list_no_meeting_for_today "Aucune réunion aujourd'hui" Heute keine Besprechungen - + meeting_info_delete "Supprimer la réunion" Besprechung löschen diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index 7e54f7863..53ab70c58 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -25,13 +25,13 @@ AbstractWindow - + contact_dialog_pick_phone_number_or_sip_address_title "Choisissez un numéro ou adresse SIP" Choose a SIP number or address - + fps_counter %1 FPS @@ -757,30 +757,30 @@ Print only logs from the application - + hide_action "Cacher" "Afficher" Hide - + show_action Show - + quit_action "Quitter" Quit - + check_for_update Check for update Check for update - + mark_all_read_action Marquer tout comme lu @@ -2513,98 +2513,98 @@ Only your correspondent can decrypt them. Chat room is being created... - + chat_dialog_delete_chat_title Supprimer la conversation ? Delete conversation ? - + chat_dialog_delete_chat_message "La conversation et tous ses messages seront supprimés." This conversation and all its messages will be deleted. - + chat_list_title "Conversations" Conversations - + menu_mark_all_as_read "mark all as read" Mark all as read - + chat_search_in_history "Rechercher une conversation" Search for a chat - + list_filter_no_result_found "Aucun résultat…" No result… - + chat_list_empty_history "Aucune conversation dans votre historique" No conversation in history - + chat_action_start_new_chat "New chat" New conversation - + chat_start_group_chat_title "Nouveau groupe" New group - + chat_action_start_group_chat "Créer" Create - - - + + + information_popup_error_title Error - + information_popup_chat_creation_failed_message "La création a échoué" Creation failed - + group_chat_error_must_have_name "Un nom doit être donné au groupe A name must be set for the group - + group_chat_error_no_participant "Please select at least one participant Please select at least one participant - + group_call_error_not_connected "Vous n'etes pas connecté" You are not connected - + chat_creation_in_progress Creation de la conversation en cours … Chat creation pending… @@ -4532,19 +4532,19 @@ Expiration : %1 MeetingListView - + meeting_info_cancelled "Réunion annulée" Meeting canceled - + meetings_list_no_meeting_for_today "Aucune réunion aujourd'hui" No meeting for today - + meeting_info_delete "Supprimer la réunion" Delete meeting diff --git a/Linphone/data/languages/fr.ts b/Linphone/data/languages/fr.ts index d64f169a3..c09a8e86b 100644 --- a/Linphone/data/languages/fr.ts +++ b/Linphone/data/languages/fr.ts @@ -25,13 +25,13 @@ AbstractWindow - + contact_dialog_pick_phone_number_or_sip_address_title "Choisissez un numéro ou adresse SIP" Choisissez un numéro ou adresse SIP - + fps_counter %1 FPS @@ -757,30 +757,30 @@ Print only logs from the application - + hide_action "Cacher" "Afficher" Cacher - + show_action Afficher - + quit_action "Quitter" Quitter - + check_for_update Check for update Rechercher une mise à jour - + mark_all_read_action Marquer tout comme lu @@ -2513,98 +2513,98 @@ en bout. Seul votre correspondant peut les déchiffrer. Création de la conversation en cours... - + chat_dialog_delete_chat_title Supprimer la conversation ? Supprimer la conversation ? - + chat_dialog_delete_chat_message "La conversation et tous ses messages seront supprimés." La conversation et tous ses messages seront supprimés. - + chat_list_title "Conversations" Conversations - + menu_mark_all_as_read "mark all as read" Tout marquer comme lu - + chat_search_in_history "Rechercher une conversation" Rechercher une conversation - + list_filter_no_result_found "Aucun résultat…" Aucun résultat… - + chat_list_empty_history "Aucune conversation dans votre historique" Aucune conversation dans votre historique - + chat_action_start_new_chat "New chat" Nouvelle conversation - + chat_start_group_chat_title "Nouveau groupe" Nouveau groupe - + chat_action_start_group_chat "Créer" Créer - - - + + + information_popup_error_title Erreur - + information_popup_chat_creation_failed_message "La création a échoué" La création a échoué - + group_chat_error_must_have_name "Un nom doit être donné au groupe Un nom doit être donné au groupe - + group_chat_error_no_participant "Please select at least one participant Veuillez sélectionner au moins un participant - + group_call_error_not_connected "Vous n'etes pas connecté" Vous n'êtes pas connecté - + chat_creation_in_progress Creation de la conversation en cours … Création de la conversation en cours… @@ -4532,19 +4532,19 @@ Expiration : %1 MeetingListView - + meeting_info_cancelled "Réunion annulée" Réunion annulée - + meetings_list_no_meeting_for_today "Aucune réunion aujourd'hui" Aucune réunion aujourd'hui - + meeting_info_delete "Supprimer la réunion" Supprimer la réunion diff --git a/Linphone/model/account/AccountModel.cpp b/Linphone/model/account/AccountModel.cpp index 98b8da4bf..97715ed58 100644 --- a/Linphone/model/account/AccountModel.cpp +++ b/Linphone/model/account/AccountModel.cpp @@ -274,7 +274,7 @@ void AccountModel::setTransport(linphone::TransportType value, bool save) { QString AccountModel::getRegistrarUri() const { if (mMonitor->getParams()->getServerAddress()) - return Utils::coreStringToAppString(mMonitor->getParams()->getServerAddress()->asString()); + return Utils::coreStringToAppString(mMonitor->getParams()->getServerAddress()->asStringUriOnly()); else return ""; } @@ -297,7 +297,7 @@ void AccountModel::setRegistrarUri(QString value) { QString AccountModel::getOutboundProxyUri() const { auto routeAddresses = mMonitor->getParams()->getRoutesAddresses(); auto outbound = - routeAddresses.empty() ? QString() : Utils::coreStringToAppString(routeAddresses.front()->asString()); + routeAddresses.empty() ? QString() : Utils::coreStringToAppString(routeAddresses.front()->asStringUriOnly()); return outbound; } @@ -399,7 +399,7 @@ void AccountModel::setExpire(int value) { QString AccountModel::getConferenceFactoryAddress() const { auto confAddress = mMonitor->getParams()->getConferenceFactoryAddress(); - return confAddress ? Utils::coreStringToAppString(confAddress->asString()) : QString(); + return confAddress ? Utils::coreStringToAppString(confAddress->asStringUriOnly()) : QString(); } void AccountModel::setConferenceFactoryAddress(QString value) { @@ -421,7 +421,7 @@ void AccountModel::setConferenceFactoryAddress(QString value) { QString AccountModel::getAudioVideoConferenceFactoryAddress() const { auto confAddress = mMonitor->getParams()->getAudioVideoConferenceFactoryAddress(); - return confAddress ? Utils::coreStringToAppString(confAddress->asString()) : QString(); + return confAddress ? Utils::coreStringToAppString(confAddress->asStringUriOnly()) : QString(); } void AccountModel::setAudioVideoConferenceFactoryAddress(QString value) { @@ -490,7 +490,7 @@ void AccountModel::setVoicemailAddress(QString value) { QString AccountModel::getVoicemailAddress() const { auto addr = mMonitor->getParams()->getVoicemailAddress(); - return addr ? Utils::coreStringToAppString(addr->asString()) : ""; + return addr ? Utils::coreStringToAppString(addr->asStringUriOnly()) : ""; } // UserData (see hpp for explanations) diff --git a/Linphone/tool/Utils.cpp b/Linphone/tool/Utils.cpp index efbdd42c1..451c11c3a 100644 --- a/Linphone/tool/Utils.cpp +++ b/Linphone/tool/Utils.cpp @@ -209,22 +209,22 @@ void Utils::createGroupCall(QString subject, const std::list &participa // Comment on annule ? Si on ferme la fenêtre ça va finir l'appel en cours void Utils::setupConference(ConferenceInfoGui *confGui) { if (!confGui) return; - auto window = App::getInstance()->getCallsWindow(QVariant()); + auto window = App::getInstance()->getOrCreateCallsWindow(QVariant()); window->setProperty("conferenceInfo", QVariant::fromValue(confGui)); window->show(); } void Utils::openCallsWindow(CallGui *call) { if (call) { - auto window = App::getInstance()->getCallsWindow(QVariant::fromValue(call)); + auto window = App::getInstance()->getOrCreateCallsWindow(QVariant::fromValue(call)); window->show(); window->raise(); } } -QQuickWindow *Utils::getCallsWindow(CallGui *callGui) { +QQuickWindow *Utils::getOrCreateCallsWindow(CallGui *callGui) { auto app = App::getInstance(); - auto window = app->getCallsWindow(QVariant::fromValue(callGui)); + auto window = app->getOrCreateCallsWindow(QVariant::fromValue(callGui)); return window; } @@ -1604,7 +1604,7 @@ VariantObject *Utils::getCurrentCallChat(CallGui *call) { showInformationPopup(tr("information_popup_error_title"), //: Failed to create 1-1 conversation with %1 ! tr("information_popup_chatroom_creation_error_message"), false, - getCallsWindow()); + getOrCreateCallsWindow()); }); return QVariant(); } @@ -1638,7 +1638,7 @@ VariantObject *Utils::getChatForAddress(QString address) { data->mConnection->invokeToCore([] { showInformationPopup(tr("information_popup_error_title"), tr("information_popup_chatroom_creation_error_message"), false, - getCallsWindow()); + getOrCreateCallsWindow()); }); return QVariant(); } diff --git a/Linphone/tool/Utils.hpp b/Linphone/tool/Utils.hpp index 23839f879..0e74b556e 100644 --- a/Linphone/tool/Utils.hpp +++ b/Linphone/tool/Utils.hpp @@ -84,7 +84,7 @@ public: const QString &description, bool isSuccess = true, QQuickWindow *window = nullptr); - Q_INVOKABLE static QQuickWindow *getCallsWindow(CallGui *callGui = nullptr); + Q_INVOKABLE static QQuickWindow *getOrCreateCallsWindow(CallGui *callGui = nullptr); Q_INVOKABLE static void closeCallsWindow(); Q_INVOKABLE static VariantObject *haveAccount(); Q_INVOKABLE static void smartShowWindow(QQuickWindow *window); diff --git a/Linphone/view/Control/Container/Call/CallHistoryLayout.qml b/Linphone/view/Control/Container/Call/CallHistoryLayout.qml index e177ef7e4..b2f849033 100644 --- a/Linphone/view/Control/Container/Call/CallHistoryLayout.qml +++ b/Linphone/view/Control/Container/Call/CallHistoryLayout.qml @@ -113,7 +113,7 @@ ColumnLayout { style: ButtonStyle.grey onClicked: { if (mainItem.conferenceInfo) { - var callsWindow = UtilsCpp.getCallsWindow() + var callsWindow = UtilsCpp.getOrCreateCallsWindow() callsWindow.setupConference(mainItem.conferenceInfo) UtilsCpp.smartShowWindow(callsWindow) } diff --git a/Linphone/view/Control/Display/Call/CallHistoryListView.qml b/Linphone/view/Control/Display/Call/CallHistoryListView.qml index f5db09fc4..167676433 100644 --- a/Linphone/view/Control/Display/Call/CallHistoryListView.qml +++ b/Linphone/view/Control/Display/Call/CallHistoryListView.qml @@ -205,7 +205,7 @@ ListView { Accessible.name: qsTr("call_name_accessible_button").arg(historyAvatar.displayNameVal) onClicked: { if (modelData.core.isConference) { - var callsWindow = UtilsCpp.getCallsWindow() + var callsWindow = UtilsCpp.getOrCreateCallsWindow() callsWindow.setupConference( modelData.core.conferenceInfo) UtilsCpp.smartShowWindow(callsWindow) diff --git a/Linphone/view/Control/Display/Chat/ChatMessageInvitationBubble.qml b/Linphone/view/Control/Display/Chat/ChatMessageInvitationBubble.qml index fa8082937..0c12f4813 100644 --- a/Linphone/view/Control/Display/Chat/ChatMessageInvitationBubble.qml +++ b/Linphone/view/Control/Display/Chat/ChatMessageInvitationBubble.qml @@ -286,7 +286,7 @@ ColumnLayout { text: qsTr("ics_bubble_join") visible: !SettingsCpp.disableMeetingsFeature && conferenceInfo.state != LinphoneEnums.ConferenceInfoState.Cancelled onClicked: { - var callsWindow = UtilsCpp.getCallsWindow() + var callsWindow = UtilsCpp.getOrCreateCallsWindow() callsWindow.setupConference(mainItem.conferenceInfoGui) UtilsCpp.smartShowWindow(callsWindow) } diff --git a/Linphone/view/Control/Display/Meeting/MeetingListView.qml b/Linphone/view/Control/Display/Meeting/MeetingListView.qml index f22a51023..4983b0567 100644 --- a/Linphone/view/Control/Display/Meeting/MeetingListView.qml +++ b/Linphone/view/Control/Display/Meeting/MeetingListView.qml @@ -102,18 +102,15 @@ ListView { initialDisplayItems: Math.max(20, Math.round(2 * mainItem.height / Utils.getSizeWithScreenRatio(63))) displayItemsStep: initialDisplayItems/2 Component.onCompleted: { - mainItem.loading = !confInfoProxy.accountConnected + mainItem.loading = false } onModelAboutToBeReset: { mainItem.loading = true } onModelReset: { - mainItem.loading = !confInfoProxy.accountConnected + mainItem.loading = false selectData(getCurrentDateConfInfo()) } - onAccountConnectedChanged: (connected) => { - mainItem.loading = !connected - } function selectData(confInfoGui){ mainItem.currentIndex = loadUntil(confInfoGui) } diff --git a/Linphone/view/Page/Layout/Main/MainLayout.qml b/Linphone/view/Page/Layout/Main/MainLayout.qml index 6f94bb336..1d000de46 100644 --- a/Linphone/view/Page/Layout/Main/MainLayout.qml +++ b/Linphone/view/Page/Layout/Main/MainLayout.qml @@ -113,7 +113,7 @@ Item { style: ButtonStyle.toast text: currentCallNotif.currentCall ? currentCallNotif.currentCall.core.conference ? ("Réunion en cours : ") + currentCallNotif.currentCall.core.conference.core.subject : (("Appel en cours : ") + currentCallNotif.remoteName) : "appel en cours" onClicked: { - var callsWindow = UtilsCpp.getCallsWindow(currentCallNotif.currentCall); + var callsWindow = UtilsCpp.getOrCreateCallsWindow(currentCallNotif.currentCall); UtilsCpp.smartShowWindow(callsWindow); } } diff --git a/Linphone/view/Page/Main/Chat/ChatPage.qml b/Linphone/view/Page/Main/Chat/ChatPage.qml index 638efce5e..19b0bd7ad 100644 --- a/Linphone/view/Page/Main/Chat/ChatPage.qml +++ b/Linphone/view/Page/Main/Chat/ChatPage.qml @@ -81,7 +81,8 @@ AbstractMainPage { showDefaultItem: listStackView.currentItem && listStackView.currentItem.objectName == "chatListItem" - && listStackView.currentItem.listView.count === 0 || false + && listStackView.currentItem.listView.count === 0 + && !listStackView.currentItem.listView.loading || false function goToNewChat() { if (listStackView.currentItem diff --git a/Linphone/view/Page/Main/Meeting/MeetingPage.qml b/Linphone/view/Page/Main/Meeting/MeetingPage.qml index 99a87e598..f0dac9a7f 100644 --- a/Linphone/view/Page/Main/Meeting/MeetingPage.qml +++ b/Linphone/view/Page/Main/Meeting/MeetingPage.qml @@ -910,7 +910,7 @@ AbstractMainPage { KeyNavigation.right: leftPanelStackView.currentItem onClicked: { console.log(mainItem.selectedConference.core.uri) - var callsWindow = UtilsCpp.getCallsWindow() + var callsWindow = UtilsCpp.getOrCreateCallsWindow() callsWindow.setupConference(mainItem.selectedConference) UtilsCpp.smartShowWindow(callsWindow) } diff --git a/Linphone/view/Page/Window/AbstractWindow.qml b/Linphone/view/Page/Window/AbstractWindow.qml index d680754d8..2b21920fe 100644 --- a/Linphone/view/Page/Window/AbstractWindow.qml +++ b/Linphone/view/Page/Window/AbstractWindow.qml @@ -16,7 +16,9 @@ ApplicationWindow { width: Math.min(Utils.getSizeWithScreenRatio(1512), Screen.desktopAvailableWidth) height: Math.min(Utils.getSizeWithScreenRatio(982), Screen.desktopAvailableHeight) - onActiveChanged: if (active) UtilsCpp.setLastActiveWindow(this) + onActiveChanged: { + if (active) UtilsCpp.setLastActiveWindow(this) + } Component.onDestruction: if (UtilsCpp.getLastActiveWindow() === this) UtilsCpp.setLastActiveWindow(null) property bool isFullscreen: visibility == Window.FullScreen diff --git a/Linphone/view/Page/Window/Call/CallsWindow.qml b/Linphone/view/Page/Window/Call/CallsWindow.qml index a60a9ea21..0458d3a16 100644 --- a/Linphone/view/Page/Window/Call/CallsWindow.qml +++ b/Linphone/view/Page/Window/Call/CallsWindow.qml @@ -65,7 +65,7 @@ AbstractWindow { onTransferStateChanged: { console.log("Transfer state:", transferState) if (mainWindow.transferState === LinphoneEnums.CallState.OutgoingInit) { - var callsWin = UtilsCpp.getCallsWindow() + var callsWin = UtilsCpp.getOrCreateCallsWindow() if (!callsWin) return //: "Transfert en cours, veuillez patienter" @@ -74,7 +74,7 @@ AbstractWindow { || mainWindow.transferState === LinphoneEnums.CallState.End || mainWindow.transferState === LinphoneEnums.CallState.Released || mainWindow.transferState === LinphoneEnums.CallState.Connected) { - var callsWin = UtilsCpp.getCallsWindow() + var callsWin = UtilsCpp.getOrCreateCallsWindow() callsWin.closeLoadingPopup() if (transferState === LinphoneEnums.CallState.Error) UtilsCpp.showInformationPopup( @@ -786,7 +786,7 @@ AbstractWindow { searchBarBorderColor: DefaultStyle.grey_200 searchBarRightMaring: 0 onContactClicked: contact => { - var callsWin = UtilsCpp.getCallsWindow() + var callsWin = UtilsCpp.getOrCreateCallsWindow() if (contact) //: "Confirmer le transfert" callsWin.showConfirmationLambdaPopup(qsTr("call_transfer_confirm_dialog_tittle"), @@ -799,7 +799,7 @@ AbstractWindow { }) } onTransferCallToAnotherRequested: dest => { - var callsWin = UtilsCpp.getCallsWindow() + var callsWin = UtilsCpp.getOrCreateCallsWindow() console.log("transfer to",dest) callsWin.showConfirmationLambdaPopup(qsTr("call_transfer_confirm_dialog_tittle"), qsTr("call_transfer_confirm_dialog_message").arg(mainWindow.call.core.remoteName).arg(dest.core.remoteName),"",