From 8751670db251b872ba12c333cf85bdfaa0e31e86 Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Fri, 12 Dec 2025 18:47:01 +0100 Subject: [PATCH] fix disable meeting feature initialization (only check if videoconference factory uri is empty) and auto switch to call page on start if disable meeting property was set and last active tab was meetings --- Linphone/data/languages/de.ts | 50 +++++++++---------- Linphone/data/languages/en.ts | 50 +++++++++---------- Linphone/data/languages/fr.ts | 50 +++++++++---------- Linphone/model/setting/SettingsModel.cpp | 9 +++- .../view/Control/Container/VerticalTabBar.qml | 9 ++++ Linphone/view/Page/Layout/Main/MainLayout.qml | 6 ++- 6 files changed, 95 insertions(+), 79 deletions(-) diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index 4582f5779..acb9d5374 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -4353,144 +4353,144 @@ Ablauf: %1 MainLayout - + bottom_navigation_calls_label "Appels" Anrufe - + open_calls_page_accessible_name "Open calls page" Anrufe öffnen - + bottom_navigation_contacts_label "Contacts" Kontakte - + open_contacts_page_accessible_name "Open contacts page" Kontakte öffnen - + bottom_navigation_conversations_label "Conversations" Konversationen - + open_conversations_page_accessible_name "Open conversations page" Chats öffnen - + bottom_navigation_meetings_label "Réunions" Besprechungen - + open_contact_page_accessible_name "Open meetings page" Meetings öffnen - + searchbar_placeholder_text "Rechercher un contact, appeler %1" Kontakt suchen, %1 anrufen - + searchbar_placeholder_text_chat_feature_enabled "ou envoyer un message …" oder eine Nachricht senden … - + do_not_disturb_accessible_name "Do not disturb" Nicht stören - - + + contact_presence_status_disable_do_not_disturb "Désactiver ne pas déranger" Nicht stören deaktivieren - + information_popup_error_title Fehler - + no_voicemail_uri_error_message "L'URI de messagerie vocale n'est pas définie." Die Voicemail-URI ist nicht definiert. - + account_list_accessible_name "Account list" Kontoliste - + application_options_accessible_name "Application options" App-Einstellungen - + drawer_menu_manage_account Mon compte Mein Konto - + contact_presence_status_enable_do_not_disturb "Activer ne pas déranger" Nicht stören aktivieren - + settings_title Einstellungen - + recordings_title "Enregistrements" Aufnahmen - + help_title "Aide" Hilfe - + help_quit_title "Quitter l'application" App beenden - + quit_app_question "Quitter %1 ?" %1 beenden? - + drawer_menu_add_account "Ajouter un compte" Konto hinzufügen diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index c0a9c5862..679f3ac22 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -4251,144 +4251,144 @@ Expiration : %1 MainLayout - + bottom_navigation_calls_label "Appels" Calls - + open_calls_page_accessible_name "Open calls page" Open calls pages - + bottom_navigation_contacts_label "Contacts" Contacts - + open_contacts_page_accessible_name "Open contacts page" Open contacts page - + bottom_navigation_conversations_label "Conversations" Conversations - + open_conversations_page_accessible_name "Open conversations page" Open conversations page - + bottom_navigation_meetings_label "Réunions" Meetings - + open_contact_page_accessible_name "Open meetings page" Open meetings page - + searchbar_placeholder_text "Rechercher un contact, appeler %1" Find contact, call %1 - + searchbar_placeholder_text_chat_feature_enabled "ou envoyer un message …" or send message … - + do_not_disturb_accessible_name "Do not disturb" Do not disturb - - + + contact_presence_status_disable_do_not_disturb "Désactiver ne pas déranger" Disable do not disturb - + information_popup_error_title Error - + no_voicemail_uri_error_message "L'URI de messagerie vocale n'est pas définie." The voicemail URI is not defined. - + account_list_accessible_name "Account list" account list - + application_options_accessible_name "Application options" Application options - + drawer_menu_manage_account Mon compte My account - + contact_presence_status_enable_do_not_disturb "Activer ne pas déranger" Enable do not disturb - + settings_title Settings - + recordings_title "Enregistrements" Records - + help_title "Aide" Help - + help_quit_title "Quitter l'application" Quit the app - + quit_app_question "Quitter %1 ?" Quit %1 ? - + drawer_menu_add_account "Ajouter un compte" Add an account diff --git a/Linphone/data/languages/fr.ts b/Linphone/data/languages/fr.ts index 1547e51ee..26392ad32 100644 --- a/Linphone/data/languages/fr.ts +++ b/Linphone/data/languages/fr.ts @@ -4251,144 +4251,144 @@ Expiration : %1 MainLayout - + bottom_navigation_calls_label "Appels" Appels - + open_calls_page_accessible_name "Open calls page" Ouvrir la page des appels - + bottom_navigation_contacts_label "Contacts" Contacts - + open_contacts_page_accessible_name "Open contacts page" Ouvrir la page des contacts - + bottom_navigation_conversations_label "Conversations" Conversations - + open_conversations_page_accessible_name "Open conversations page" Ouvrir la page des conversations - + bottom_navigation_meetings_label "Réunions" Réunions - + open_contact_page_accessible_name "Open meetings page" Ouvrir la page des réunions - + searchbar_placeholder_text "Rechercher un contact, appeler %1" Rechercher un contact, appeler %1 - + searchbar_placeholder_text_chat_feature_enabled "ou envoyer un message …" ou envoyer un message … - + do_not_disturb_accessible_name "Do not disturb" Ne pas déranger - - + + contact_presence_status_disable_do_not_disturb "Désactiver ne pas déranger" Désactiver ne pas déranger - + information_popup_error_title Erreur - + no_voicemail_uri_error_message "L'URI de messagerie vocale n'est pas définie." L'URI de messagerie vocale n'est pas définie. - + account_list_accessible_name "Account list" liste des comptes - + application_options_accessible_name "Application options" Options de l'application - + drawer_menu_manage_account Mon compte Mon compte - + contact_presence_status_enable_do_not_disturb "Activer ne pas déranger" Activer ne pas déranger - + settings_title Paramètres - + recordings_title "Enregistrements" Enregistrements - + help_title "Aide" Aide - + help_quit_title "Quitter l'application" Quitter l'application - + quit_app_question "Quitter %1 ?" Quitter %1 ? - + drawer_menu_add_account "Ajouter un compte" Ajouter un compte diff --git a/Linphone/model/setting/SettingsModel.cpp b/Linphone/model/setting/SettingsModel.cpp index ff3a69721..9f0958e6c 100644 --- a/Linphone/model/setting/SettingsModel.cpp +++ b/Linphone/model/setting/SettingsModel.cpp @@ -70,10 +70,15 @@ SettingsModel::SettingsModel() { CoreModel::getInstance().get(), &CoreModel::defaultAccountChanged, this, [this](const std::shared_ptr &core, const std::shared_ptr account) { mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); - setDisableMeetingsFeature(account && !account->getParams()->getAudioVideoConferenceFactoryAddress()); + if (!getDisableMeetingsFeature() && account && + !account->getParams()->getAudioVideoConferenceFactoryAddress()) + setDisableMeetingsFeature(true); }); auto defaultAccount = core->getDefaultAccount(); - setDisableMeetingsFeature(defaultAccount && !defaultAccount->getParams()->getAudioVideoConferenceFactoryAddress()); + if (!getDisableMeetingsFeature() && defaultAccount && + !defaultAccount->getParams()->getAudioVideoConferenceFactoryAddress()) + setDisableMeetingsFeature(true); + // Media cards must not be used twice (capture card + call) else we will get latencies issues and bad echo // calibrations in call. QObject::connect(CoreModel::getInstance().get(), &CoreModel::firstCallStarted, this, diff --git a/Linphone/view/Control/Container/VerticalTabBar.qml b/Linphone/view/Control/Container/VerticalTabBar.qml index 329ece59e..cad6ac008 100644 --- a/Linphone/view/Control/Container/VerticalTabBar.qml +++ b/Linphone/view/Control/Container/VerticalTabBar.qml @@ -16,11 +16,19 @@ Control.TabBar { readonly property alias cornerRadius: bottomLeftCorner.radius property AccountGui defaultAccount + + property int visibleCount: 0 // Call it after model is ready. If done before, Repeater will not be updated function initButtons(){ actionsRepeater.model = mainItem.model } + function updateVisibleCount() { + mainItem.visibleCount = 0 + contentChildren.forEach(child => { + if (child.visible) mainItem.visibleCount = mainItem.visibleCount + 1 + }) + } onDefaultAccountChanged: { if (defaultAccount) defaultAccount.core?.lRefreshNotifications() @@ -86,6 +94,7 @@ Control.TabBar { topInset: Utils.getSizeWithScreenRatio(32) hoverEnabled: true visible: modelData?.visible != undefined ? modelData.visible : true + onVisibleChanged: mainItem.updateVisibleCount() text: modelData.accessibilityLabel property bool keyboardFocus: FocusHelper.keyboardFocus UnreadNotification { diff --git a/Linphone/view/Page/Layout/Main/MainLayout.qml b/Linphone/view/Page/Layout/Main/MainLayout.qml index 7c6ffe852..069484299 100644 --- a/Linphone/view/Page/Layout/Main/MainLayout.qml +++ b/Linphone/view/Page/Layout/Main/MainLayout.qml @@ -130,6 +130,7 @@ Item { Layout.preferredWidth: Utils.getSizeWithScreenRatio(82) defaultAccount: accountProxy.defaultAccount currentIndex: 0 + onCountChanged: if (currentIndex >= count) currentIndex = 0 Binding on currentIndex { when: mainItem.contextualMenuOpenedComponent != undefined value: -1 @@ -171,7 +172,7 @@ Item { } ] onCurrentIndexChanged: { - if (currentIndex === -1) + if (currentIndex === -1 || currentIndex >= tabbar.visibleCount) return; if (currentIndex === 0 && accountProxy.defaultAccount) accountProxy.defaultAccount.core?.lResetMissedCalls(); @@ -199,7 +200,8 @@ Item { } initButtons(); currentIndex = SettingsCpp.getLastActiveTabIndex(); - if (currentIndex === -1) + tabbar.updateVisibleCount() + if (currentIndex === -1 || currentIndex >= tabbar.visibleCount) currentIndex = 0; } }