From a68fa9bed14d9cc27523a213cb56638818653612 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Tue, 29 Apr 2025 15:33:53 +0200 Subject: [PATCH] File permission after auto downloading a file. --- CHANGELOG.md | 3 +++ linphone-app/assets/languages/cs.ts | 5 +++++ linphone-app/assets/languages/da.ts | 5 +++++ linphone-app/assets/languages/de.ts | 5 +++++ linphone-app/assets/languages/en.ts | 5 +++++ linphone-app/assets/languages/es.ts | 5 +++++ linphone-app/assets/languages/fr_FR.ts | 5 +++++ linphone-app/assets/languages/hu.ts | 5 +++++ linphone-app/assets/languages/it.ts | 5 +++++ linphone-app/assets/languages/ja.ts | 5 +++++ linphone-app/assets/languages/lt.ts | 5 +++++ linphone-app/assets/languages/pt_BR.ts | 5 +++++ linphone-app/assets/languages/ru.ts | 5 +++++ linphone-app/assets/languages/sv.ts | 5 +++++ linphone-app/assets/languages/tr.ts | 5 +++++ linphone-app/assets/languages/uk.ts | 5 +++++ linphone-app/assets/languages/zh_CN.ts | 5 +++++ linphone-app/src/components/core/CoreHandlers.cpp | 2 +- .../src/components/settings/SettingsModel.cpp | 9 +++++++++ .../src/components/settings/SettingsModel.hpp | 8 ++++++-- .../ui/views/App/Settings/SettingsCallsChat.qml | 13 +++++++++++++ 21 files changed, 112 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f39fa6646..55710b9b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - File permission after auto downloading a file. +### Added +- Option to mute chat reactions. + ## 5.2.3 - 2024-03-29 ### Fixed diff --git a/linphone-app/assets/languages/cs.ts b/linphone-app/assets/languages/cs.ts index ded24a847..406c6ef78 100644 --- a/linphone-app/assets/languages/cs.ts +++ b/linphone-app/assets/languages/cs.ts @@ -3136,6 +3136,11 @@ Klikněte zde: <a href="%1">%1</a> 'Enable screenshots' : Label on switch to choose if we can take screenshots while being in call. Povolit snímky obrazovky + + chatReactionsNotificationsEnabledLabel + 'Enable notifications on reactions': settings label for enabling notifications on chat reactions. + + SettingsLdap diff --git a/linphone-app/assets/languages/da.ts b/linphone-app/assets/languages/da.ts index 7aad5a260..a2e9a40b1 100644 --- a/linphone-app/assets/languages/da.ts +++ b/linphone-app/assets/languages/da.ts @@ -3116,6 +3116,11 @@ Klik her: <a href="%1">%1</a> 'Enable screenshots' : Label on switch to choose if we can take screenshots while being in call. + + chatReactionsNotificationsEnabledLabel + 'Enable notifications on reactions': settings label for enabling notifications on chat reactions. + + SettingsLdap diff --git a/linphone-app/assets/languages/de.ts b/linphone-app/assets/languages/de.ts index f18e2be37..dfcf7998b 100644 --- a/linphone-app/assets/languages/de.ts +++ b/linphone-app/assets/languages/de.ts @@ -3116,6 +3116,11 @@ Klicken Sie hier: <a href="%1">%1</a> 'Enable screenshots' : Label on switch to choose if we can take screenshots while being in call. Bildschirmfotos aktivieren + + chatReactionsNotificationsEnabledLabel + 'Enable notifications on reactions': settings label for enabling notifications on chat reactions. + + SettingsLdap diff --git a/linphone-app/assets/languages/en.ts b/linphone-app/assets/languages/en.ts index 14c9af3f1..19e5ee30e 100644 --- a/linphone-app/assets/languages/en.ts +++ b/linphone-app/assets/languages/en.ts @@ -3123,6 +3123,11 @@ Click here: <a href="%1">%1</a> 'Enable screenshots' : Label on switch to choose if we can take screenshots while being in call. Enable screenshots + + chatReactionsNotificationsEnabledLabel + 'Enable notifications on reactions': settings label for enabling notifications on chat reactions. + Enable notifications on reactions + SettingsLdap diff --git a/linphone-app/assets/languages/es.ts b/linphone-app/assets/languages/es.ts index 5f531789f..f16cd074b 100644 --- a/linphone-app/assets/languages/es.ts +++ b/linphone-app/assets/languages/es.ts @@ -3116,6 +3116,11 @@ Haga clic aquí: <a href="%1">%1 </a> 'Enable screenshots' : Label on switch to choose if we can take screenshots while being in call. + + chatReactionsNotificationsEnabledLabel + 'Enable notifications on reactions': settings label for enabling notifications on chat reactions. + + SettingsLdap diff --git a/linphone-app/assets/languages/fr_FR.ts b/linphone-app/assets/languages/fr_FR.ts index 16c5eaaf2..73a0503ec 100644 --- a/linphone-app/assets/languages/fr_FR.ts +++ b/linphone-app/assets/languages/fr_FR.ts @@ -3116,6 +3116,11 @@ Cliquez ici : <a href="%1">%1</a> 'Enable screenshots' : Label on switch to choose if we can take screenshots while being in call. Activer les captures d'écran + + chatReactionsNotificationsEnabledLabel + 'Enable notifications on reactions': settings label for enabling notifications on chat reactions. + Activer les notifications sur les réactions. + SettingsLdap diff --git a/linphone-app/assets/languages/hu.ts b/linphone-app/assets/languages/hu.ts index efc80fd2d..899e5b544 100644 --- a/linphone-app/assets/languages/hu.ts +++ b/linphone-app/assets/languages/hu.ts @@ -3102,6 +3102,11 @@ Kattintson ide: <a href="%1">%1</a> 'Enable screenshots' : Label on switch to choose if we can take screenshots while being in call. + + chatReactionsNotificationsEnabledLabel + 'Enable notifications on reactions': settings label for enabling notifications on chat reactions. + + SettingsLdap diff --git a/linphone-app/assets/languages/it.ts b/linphone-app/assets/languages/it.ts index 335b8a1dc..9a0b582a2 100644 --- a/linphone-app/assets/languages/it.ts +++ b/linphone-app/assets/languages/it.ts @@ -3116,6 +3116,11 @@ Clicca: <a href="%1">%1</a> 'Enable screenshots' : Label on switch to choose if we can take screenshots while being in call. + + chatReactionsNotificationsEnabledLabel + 'Enable notifications on reactions': settings label for enabling notifications on chat reactions. + + SettingsLdap diff --git a/linphone-app/assets/languages/ja.ts b/linphone-app/assets/languages/ja.ts index 25410a08f..c517ad38d 100644 --- a/linphone-app/assets/languages/ja.ts +++ b/linphone-app/assets/languages/ja.ts @@ -3102,6 +3102,11 @@ 'Enable screenshots' : Label on switch to choose if we can take screenshots while being in call. スクリーンショットを有効にする + + chatReactionsNotificationsEnabledLabel + 'Enable notifications on reactions': settings label for enabling notifications on chat reactions. + + SettingsLdap diff --git a/linphone-app/assets/languages/lt.ts b/linphone-app/assets/languages/lt.ts index d80e11ec3..aeb546a10 100644 --- a/linphone-app/assets/languages/lt.ts +++ b/linphone-app/assets/languages/lt.ts @@ -3130,6 +3130,11 @@ Spustelėkite čia: <a href="%1">%1</a> 'Enable screenshots' : Label on switch to choose if we can take screenshots while being in call. + + chatReactionsNotificationsEnabledLabel + 'Enable notifications on reactions': settings label for enabling notifications on chat reactions. + + SettingsLdap diff --git a/linphone-app/assets/languages/pt_BR.ts b/linphone-app/assets/languages/pt_BR.ts index 9bd376192..7a5e61a5d 100644 --- a/linphone-app/assets/languages/pt_BR.ts +++ b/linphone-app/assets/languages/pt_BR.ts @@ -3116,6 +3116,11 @@ Clique aqui: <a href="%1">%1 </a> 'Enable screenshots' : Label on switch to choose if we can take screenshots while being in call. Habilitar capturas de tela + + chatReactionsNotificationsEnabledLabel + 'Enable notifications on reactions': settings label for enabling notifications on chat reactions. + + SettingsLdap diff --git a/linphone-app/assets/languages/ru.ts b/linphone-app/assets/languages/ru.ts index fbd879f1d..d8677ed01 100644 --- a/linphone-app/assets/languages/ru.ts +++ b/linphone-app/assets/languages/ru.ts @@ -3130,6 +3130,11 @@ 'Enable screenshots' : Label on switch to choose if we can take screenshots while being in call. Разрешить снимки экрана + + chatReactionsNotificationsEnabledLabel + 'Enable notifications on reactions': settings label for enabling notifications on chat reactions. + + SettingsLdap diff --git a/linphone-app/assets/languages/sv.ts b/linphone-app/assets/languages/sv.ts index 05fbcda80..7e30de147 100644 --- a/linphone-app/assets/languages/sv.ts +++ b/linphone-app/assets/languages/sv.ts @@ -3116,6 +3116,11 @@ Klicka här: <a href="%1">%1</a> 'Enable screenshots' : Label on switch to choose if we can take screenshots while being in call. + + chatReactionsNotificationsEnabledLabel + 'Enable notifications on reactions': settings label for enabling notifications on chat reactions. + + SettingsLdap diff --git a/linphone-app/assets/languages/tr.ts b/linphone-app/assets/languages/tr.ts index 4f65fbc2c..ea38d9131 100644 --- a/linphone-app/assets/languages/tr.ts +++ b/linphone-app/assets/languages/tr.ts @@ -3102,6 +3102,11 @@ Buraya tıklayın: <a href="%1">%1</a> 'Enable screenshots' : Label on switch to choose if we can take screenshots while being in call. + + chatReactionsNotificationsEnabledLabel + 'Enable notifications on reactions': settings label for enabling notifications on chat reactions. + + SettingsLdap diff --git a/linphone-app/assets/languages/uk.ts b/linphone-app/assets/languages/uk.ts index 2f7777e5c..0cde3cbee 100644 --- a/linphone-app/assets/languages/uk.ts +++ b/linphone-app/assets/languages/uk.ts @@ -3130,6 +3130,11 @@ 'Enable screenshots' : Label on switch to choose if we can take screenshots while being in call. + + chatReactionsNotificationsEnabledLabel + 'Enable notifications on reactions': settings label for enabling notifications on chat reactions. + + SettingsLdap diff --git a/linphone-app/assets/languages/zh_CN.ts b/linphone-app/assets/languages/zh_CN.ts index d37e5130d..7cf77a13d 100644 --- a/linphone-app/assets/languages/zh_CN.ts +++ b/linphone-app/assets/languages/zh_CN.ts @@ -3102,6 +3102,11 @@ 'Enable screenshots' : Label on switch to choose if we can take screenshots while being in call. + + chatReactionsNotificationsEnabledLabel + 'Enable notifications on reactions': settings label for enabling notifications on chat reactions. + + SettingsLdap diff --git a/linphone-app/src/components/core/CoreHandlers.cpp b/linphone-app/src/components/core/CoreHandlers.cpp index e7cfb19dd..8f19cfcc1 100644 --- a/linphone-app/src/components/core/CoreHandlers.cpp +++ b/linphone-app/src/components/core/CoreHandlers.cpp @@ -331,7 +331,7 @@ void CoreHandlers::onNewMessageReaction(const std::shared_ptr & appSettings.beginGroup("chatrooms"); - if( !message || CoreManager::getInstance()->getAccountSettingsModel()->findAccount(reaction->getFromAddress())) + if( !message || CoreManager::getInstance()->getAccountSettingsModel()->findAccount(reaction->getFromAddress()) || !settingsModel->getChatReactionsNotificationsEnabled()) return; // 1. Do not notify if chat is not activated. if (chatRoom->getCurrentParams()->getEncryptionBackend() == linphone::ChatRoom::EncryptionBackend::None && !settingsModel->getStandardChatEnabled() diff --git a/linphone-app/src/components/settings/SettingsModel.cpp b/linphone-app/src/components/settings/SettingsModel.cpp index dae374abb..c21e47335 100644 --- a/linphone-app/src/components/settings/SettingsModel.cpp +++ b/linphone-app/src/components/settings/SettingsModel.cpp @@ -1034,6 +1034,15 @@ void SettingsModel::setChatNotificationsEnabled(bool status) { emit chatNotificationsEnabledChanged(status); } +bool SettingsModel::getChatReactionsNotificationsEnabled () const { + return !!mConfig->getInt(UiSection, "chat_reactions_notifications_enabled", 1); +} + +void SettingsModel::setChatReactionsNotificationsEnabled (bool status) { + mConfig->setInt(UiSection, "chat_reactions_notifications_enabled", status); + emit chatReactionsNotificationsEnabledChanged(status); +} + // ----------------------------------------------------------------------------- bool SettingsModel::getChatNotificationSoundEnabled() const { diff --git a/linphone-app/src/components/settings/SettingsModel.hpp b/linphone-app/src/components/settings/SettingsModel.hpp index 412b9b71d..447852a47 100644 --- a/linphone-app/src/components/settings/SettingsModel.hpp +++ b/linphone-app/src/components/settings/SettingsModel.hpp @@ -173,11 +173,12 @@ class SettingsModel : public QObject { Q_PROPERTY(bool chatNotificationsEnabled READ getChatNotificationsEnabled WRITE setChatNotificationsEnabled NOTIFY chatNotificationsEnabledChanged) + Q_PROPERTY(bool chatReactionsNotificationsEnabled READ getChatReactionsNotificationsEnabled WRITE + setChatReactionsNotificationsEnabled NOTIFY chatReactionsNotificationsEnabledChanged) Q_PROPERTY(bool chatNotificationSoundEnabled READ getChatNotificationSoundEnabled WRITE setChatNotificationSoundEnabled NOTIFY chatNotificationSoundEnabledChanged) Q_PROPERTY(QString chatNotificationSoundPath READ getChatNotificationSoundPath WRITE setChatNotificationSoundPath NOTIFY chatNotificationSoundPathChanged) - Q_PROPERTY(QString fileTransferUrl READ getFileTransferUrl WRITE setFileTransferUrl NOTIFY fileTransferUrlChanged) Q_PROPERTY(bool limeIsSupported READ getLimeIsSupported CONSTANT) @@ -525,6 +526,9 @@ public: bool getChatNotificationsEnabled() const; void setChatNotificationsEnabled(bool status); + bool getChatReactionsNotificationsEnabled() const; + void setChatReactionsNotificationsEnabled(bool status); + bool getChatNotificationSoundEnabled() const; void setChatNotificationSoundEnabled(bool status); @@ -875,6 +879,7 @@ signals: void videoConferenceEnabledChanged(); void chatNotificationsEnabledChanged(bool status); + void chatReactionsNotificationsEnabledChanged(bool status); void chatNotificationSoundEnabledChanged(bool status); void chatNotificationSoundPathChanged(const QString &path); @@ -884,7 +889,6 @@ signals: void limeStateChanged(bool state); void contactsEnabledChanged(bool status); - void createEphemeralsChatRoomsChanged(); // Network. ------------------------------------------------------------------ diff --git a/linphone-app/ui/views/App/Settings/SettingsCallsChat.qml b/linphone-app/ui/views/App/Settings/SettingsCallsChat.qml index c39b6221f..24446ef09 100644 --- a/linphone-app/ui/views/App/Settings/SettingsCallsChat.qml +++ b/linphone-app/ui/views/App/Settings/SettingsCallsChat.qml @@ -269,6 +269,19 @@ TabContainer { onClicked: SettingsModel.chatNotificationsEnabled = !checked } } + FormGroup { + //: 'Enable notifications on reactions': settings label for enabling notifications on chat reactions. + label: qsTr('chatReactionsNotificationsEnabledLabel') + + Switch { + id: enableChatReactionsNotifications + + checked: SettingsModel.chatReactionsNotificationsEnabled + + onClicked: SettingsModel.chatReactionsNotificationsEnabled = !checked + } + } + FormGroup {} } FormLine { FormGroup {