diff --git a/Linphone/core/notifier/Notifier.cpp b/Linphone/core/notifier/Notifier.cpp index e38851a6d..9b97ac93c 100644 --- a/Linphone/core/notifier/Notifier.cpp +++ b/Linphone/core/notifier/Notifier.cpp @@ -319,6 +319,8 @@ void Notifier::notifyReceivedMessages(const std::shared_ptr const list> &messages) { mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); + if (room->getMuted()) return; + QString txt; QString remoteAddress; diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index dcb9cab94..d8cd16086 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -1774,6 +1774,18 @@ "Supprimer" + + + chat_room_mute + "Mute" + + + + + chat_room_unmute + "Unmute" + + chat_list_delete_chat_popup_title @@ -3082,6 +3094,12 @@ Error "Sourdine" Stummschalten + + + group_infos_unmute + "Réactiver les notifications" + Unmute + group_infos_meeting @@ -4245,6 +4263,12 @@ Error "Sourdine" Stummschalten + + + one_one_infos_unmute + "Réactiver les notifications" + Unmute + one_one_infos_search diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index 74e3503f2..d0b04d428 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -1736,6 +1736,18 @@ "Supprimer" Delete + + + chat_room_mute + "Sourdine" + Mute + + + + chat_room_unmute + "Unmute" + Unmute + chat_list_delete_chat_popup_title @@ -3005,6 +3017,12 @@ Only your correspondent can decrypt them. "Sourdine" Mute + + + group_infos_unmute + "Réactiver les notifications" + Unmute + group_infos_meeting @@ -4158,6 +4176,12 @@ Only your correspondent can decrypt them. "Sourdine" Mute + + + one_one_infos_unmute + "Réactiver les notifications" + Unmute + one_one_infos_search diff --git a/Linphone/data/languages/fr_FR.ts b/Linphone/data/languages/fr_FR.ts index 9d13ef543..7c90e5463 100644 --- a/Linphone/data/languages/fr_FR.ts +++ b/Linphone/data/languages/fr_FR.ts @@ -1736,6 +1736,18 @@ "Supprimer" Supprimer + + + chat_room_mute + "Sourdine" + Mettre en sourdine + + + + chat_room_unmute + "Unmute" + Enlever la sourdine + chat_list_delete_chat_popup_title @@ -3005,6 +3017,12 @@ en bout. Seul votre correspondant peut les déchiffrer. "Sourdine" Sourdine + + + group_infos_unmute + "Réactiver les notifications" + Réactiver les notifications + group_infos_meeting @@ -4158,6 +4176,12 @@ en bout. Seul votre correspondant peut les déchiffrer. "Sourdine" Sourdine + + + one_one_infos_unmute + "Réactiver les notifications" + Réactiver les notifications + one_one_infos_search diff --git a/Linphone/view/Control/Display/Chat/ChatListView.qml b/Linphone/view/Control/Display/Chat/ChatListView.qml index 280b427e6..0f93daa00 100644 --- a/Linphone/view/Control/Display/Chat/ChatListView.qml +++ b/Linphone/view/Control/Display/Chat/ChatListView.qml @@ -335,6 +335,17 @@ ListView { visible: mouseArea.containsMouse || hovered || popup.opened enabled: visible popup.contentItem: ColumnLayout { + IconLabelButton { + //: "Sourdine" + text: modelData.core.muted ? qsTr("chat_room_unmute") : qsTr("chat_room_mute") + icon.source: modelData.core.muted ? AppIcons.bell : AppIcons.bellSlash + spacing: Math.round(10 * DefaultStyle.dp) + Layout.fillWidth: true + onClicked: { + modelData.core.muted = !modelData.core.muted + chatroomPopup.close() + } + } IconLabelButton { //: "Supprimer" text: qsTr("chat_room_delete") diff --git a/Linphone/view/Page/Form/Chat/SelectedChatView.qml b/Linphone/view/Page/Form/Chat/SelectedChatView.qml index a1808d6ed..e177f7c63 100644 --- a/Linphone/view/Page/Form/Chat/SelectedChatView.qml +++ b/Linphone/view/Page/Form/Chat/SelectedChatView.qml @@ -81,6 +81,14 @@ RowLayout { capitalization: Font.Capitalize } } + EffectImage { + visible: mainItem.chat?.core.muted + Layout.preferredWidth: 20 * DefaultStyle.dp + Layout.alignment: Qt.AlignVCenter + Layout.preferredHeight: 20 * DefaultStyle.dp + colorizationColor: DefaultStyle.main1_500_main + imageSource: AppIcons.bellSlash + } }, RowLayout { anchors.right: parent.right diff --git a/Linphone/view/Page/Layout/Chat/GroupConversationInfos.qml b/Linphone/view/Page/Layout/Chat/GroupConversationInfos.qml index 62a4121f4..b582a1721 100644 --- a/Linphone/view/Page/Layout/Chat/GroupConversationInfos.qml +++ b/Linphone/view/Page/Layout/Chat/GroupConversationInfos.qml @@ -116,10 +116,8 @@ ColumnLayout { button.icon.height: Math.round(24 * DefaultStyle.dp) button.icon.source: chatCore.muted ? AppIcons.bell : AppIcons.bellSlash //: "Sourdine" - label: qsTr("group_infos_mute") - button.onClicked: { - chatCore.muted = !chatCore.muted - } + label: chatCore.muted ? qsTr("group_infos_unmute") : qsTr("group_infos_mute") + button.onClicked: chatCore.muted = !chatCore.muted } LabelButton { visible: !SettingsCpp.disableMeetingsFeature diff --git a/Linphone/view/Page/Layout/Chat/OneOneConversationInfos.qml b/Linphone/view/Page/Layout/Chat/OneOneConversationInfos.qml index 70e36a66f..b1e3282f7 100644 --- a/Linphone/view/Page/Layout/Chat/OneOneConversationInfos.qml +++ b/Linphone/view/Page/Layout/Chat/OneOneConversationInfos.qml @@ -71,7 +71,7 @@ ColumnLayout { button.icon.height: Math.round(24 * DefaultStyle.dp) button.icon.source: mainItem.chatCore.muted ? AppIcons.bell : AppIcons.bellSlash //: "Sourdine" - label: qsTr("one_one_infos_mute") + label: mainItem.chatCore.muted ? qsTr("one_one_infos_unmute") : qsTr("one_one_infos_mute") button.onClicked: { mainItem.chatCore.muted = !mainItem.chatCore.muted }