From b802fec33c49398f8ab5e97d93dac4a5e68633f2 Mon Sep 17 00:00:00 2001 From: "gaelle.braud" Date: Tue, 18 Nov 2025 14:41:09 +0100 Subject: [PATCH] hide chatroom actions if user left group #LINQT-2189 hide new group chat button if no conference factory uri defined for the account #LINQT-2178 --- Linphone/core/proxy/SortFilterProxy.cpp | 14 +++++++++++++ Linphone/data/languages/de.ts | 20 +++++++++---------- Linphone/data/languages/en.ts | 20 +++++++++---------- Linphone/data/languages/fr.ts | 20 +++++++++---------- .../view/Page/Form/Chat/SelectedChatView.qml | 2 +- .../Page/Layout/Chat/ConversationInfos.qml | 1 + .../Settings/AccountSettingsGeneralLayout.qml | 2 +- Linphone/view/Page/Main/Chat/ChatPage.qml | 1 + 8 files changed, 48 insertions(+), 32 deletions(-) diff --git a/Linphone/core/proxy/SortFilterProxy.cpp b/Linphone/core/proxy/SortFilterProxy.cpp index aaa532a6e..a7078f99e 100644 --- a/Linphone/core/proxy/SortFilterProxy.cpp +++ b/Linphone/core/proxy/SortFilterProxy.cpp @@ -63,9 +63,14 @@ int SortFilterProxy::getFilterType() const { void SortFilterProxy::setFilterType(int filterType) { if (getFilterType() != filterType) { +#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0) beginFilterChange(); mFilterType = filterType; endFilterChange(); +#else + mFilterType = filterType; + invalidateFilter(); +#endif emit filterTypeChanged(filterType); } } @@ -76,9 +81,14 @@ QString SortFilterProxy::getFilterText() const { void SortFilterProxy::setFilterText(const QString &filter) { if (mFilterText != filter) { +#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0) beginFilterChange(); mFilterText = filter; endFilterChange(); +#else + mFilterText = filter; + invalidateFilter(); +#endif emit filterTextChanged(); } } @@ -92,6 +102,10 @@ void SortFilterProxy::remove(int index, int count) { } void SortFilterProxy::invalidateFilter() { +#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0) QSortFilterProxyModel::beginFilterChange(); QSortFilterProxyModel::endFilterChange(); +#else + invalidateFilter(); +#endif } diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index 4ffe69aeb..4b6bf5584 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -2573,26 +2573,26 @@ Error - + 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é" @@ -2603,25 +2603,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 … diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index 612674dc9..7f2532e2b 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -2547,50 +2547,50 @@ Only your correspondent can decrypt them. 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… diff --git a/Linphone/data/languages/fr.ts b/Linphone/data/languages/fr.ts index 2a42761e8..7aeb62926 100644 --- a/Linphone/data/languages/fr.ts +++ b/Linphone/data/languages/fr.ts @@ -2547,50 +2547,50 @@ en bout. Seul votre correspondant peut les déchiffrer. 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… diff --git a/Linphone/view/Page/Form/Chat/SelectedChatView.qml b/Linphone/view/Page/Form/Chat/SelectedChatView.qml index ddd71235e..5043d0c5a 100644 --- a/Linphone/view/Page/Form/Chat/SelectedChatView.qml +++ b/Linphone/view/Page/Form/Chat/SelectedChatView.qml @@ -135,7 +135,7 @@ FocusScope { RowLayout { spacing: Utils.getSizeWithScreenRatio(16) RoundButton { - visible: !mainItem.call + visible: !mainItem.call && !mainItem.chat?.core.isReadOnly style: ButtonStyle.noBackground icon.source: AppIcons.phone onPressed: { diff --git a/Linphone/view/Page/Layout/Chat/ConversationInfos.qml b/Linphone/view/Page/Layout/Chat/ConversationInfos.qml index eddad7739..35bb8319d 100644 --- a/Linphone/view/Page/Layout/Chat/ConversationInfos.qml +++ b/Linphone/view/Page/Layout/Chat/ConversationInfos.qml @@ -171,6 +171,7 @@ ColumnLayout { } RowLayout { + visible: !mainItem.chatCore.isReadOnly spacing: Utils.getSizeWithScreenRatio(10) Layout.alignment: Qt.AlignHCenter Layout.topMargin: Utils.getSizeWithScreenRatio(30) diff --git a/Linphone/view/Page/Layout/Settings/AccountSettingsGeneralLayout.qml b/Linphone/view/Page/Layout/Settings/AccountSettingsGeneralLayout.qml index 6c9345f9a..7e36fddd0 100644 --- a/Linphone/view/Page/Layout/Settings/AccountSettingsGeneralLayout.qml +++ b/Linphone/view/Page/Layout/Settings/AccountSettingsGeneralLayout.qml @@ -130,7 +130,7 @@ AbstractSettingsLayout { } else { UtilsCpp.showInformationPopup(qsTr("error"), //: Error copying your SIP address - qsTr("account_settings_sip_address_copied_error_message")) + qsTr("account_settings_sip_address_copied_error_message"), false) } } } diff --git a/Linphone/view/Page/Main/Chat/ChatPage.qml b/Linphone/view/Page/Main/Chat/ChatPage.qml index c1db27782..315834520 100644 --- a/Linphone/view/Page/Main/Chat/ChatPage.qml +++ b/Linphone/view/Page/Main/Chat/ChatPage.qml @@ -261,6 +261,7 @@ AbstractMainPage { } NewChatForm { id: newChatForm + startGroupButtonVisible: mainItem.account && mainItem.account.core.conferenceFactoryAddress !== "" Layout.fillWidth: true Layout.fillHeight: true Layout.rightMargin: Utils.getSizeWithScreenRatio(8)