File permission after auto downloading a file.

This commit is contained in:
Julien Wadel 2025-04-29 15:33:53 +02:00
parent 61a33b539a
commit a68fa9bed1
21 changed files with 112 additions and 3 deletions

View file

@ -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

View file

@ -3136,6 +3136,11 @@ Klikněte zde: <a href="%1">%1</a>
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation>Povolit snímky obrazovky</translation>
</message>
<message>
<source>chatReactionsNotificationsEnabledLabel</source>
<extracomment>&apos;Enable notifications on reactions&apos;: settings label for enabling notifications on chat reactions.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -3116,6 +3116,11 @@ Klik her: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>chatReactionsNotificationsEnabledLabel</source>
<extracomment>&apos;Enable notifications on reactions&apos;: settings label for enabling notifications on chat reactions.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -3116,6 +3116,11 @@ Klicken Sie hier: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation>Bildschirmfotos aktivieren</translation>
</message>
<message>
<source>chatReactionsNotificationsEnabledLabel</source>
<extracomment>&apos;Enable notifications on reactions&apos;: settings label for enabling notifications on chat reactions.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -3123,6 +3123,11 @@ Click here: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation>Enable screenshots</translation>
</message>
<message>
<source>chatReactionsNotificationsEnabledLabel</source>
<extracomment>&apos;Enable notifications on reactions&apos;: settings label for enabling notifications on chat reactions.</extracomment>
<translation>Enable notifications on reactions</translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -3116,6 +3116,11 @@ Haga clic aquí: &lt;a href=&quot;%1&quot;&gt;%1 &lt;/a&gt;
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>chatReactionsNotificationsEnabledLabel</source>
<extracomment>&apos;Enable notifications on reactions&apos;: settings label for enabling notifications on chat reactions.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -3116,6 +3116,11 @@ Cliquez ici : &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation>Activer les captures d&apos;écran</translation>
</message>
<message>
<source>chatReactionsNotificationsEnabledLabel</source>
<extracomment>&apos;Enable notifications on reactions&apos;: settings label for enabling notifications on chat reactions.</extracomment>
<translation>Activer les notifications sur les réactions.</translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -3102,6 +3102,11 @@ Kattintson ide: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>chatReactionsNotificationsEnabledLabel</source>
<extracomment>&apos;Enable notifications on reactions&apos;: settings label for enabling notifications on chat reactions.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -3116,6 +3116,11 @@ Clicca: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>chatReactionsNotificationsEnabledLabel</source>
<extracomment>&apos;Enable notifications on reactions&apos;: settings label for enabling notifications on chat reactions.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -3102,6 +3102,11 @@
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation></translation>
</message>
<message>
<source>chatReactionsNotificationsEnabledLabel</source>
<extracomment>&apos;Enable notifications on reactions&apos;: settings label for enabling notifications on chat reactions.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -3130,6 +3130,11 @@ Spustelėkite čia: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>chatReactionsNotificationsEnabledLabel</source>
<extracomment>&apos;Enable notifications on reactions&apos;: settings label for enabling notifications on chat reactions.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -3116,6 +3116,11 @@ Clique aqui: &lt;a href=&quot;%1&quot;&gt;%1 &lt;/a&gt;
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation>Habilitar capturas de tela</translation>
</message>
<message>
<source>chatReactionsNotificationsEnabledLabel</source>
<extracomment>&apos;Enable notifications on reactions&apos;: settings label for enabling notifications on chat reactions.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -3130,6 +3130,11 @@
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation>Разрешить снимки экрана</translation>
</message>
<message>
<source>chatReactionsNotificationsEnabledLabel</source>
<extracomment>&apos;Enable notifications on reactions&apos;: settings label for enabling notifications on chat reactions.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -3116,6 +3116,11 @@ Klicka här: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>chatReactionsNotificationsEnabledLabel</source>
<extracomment>&apos;Enable notifications on reactions&apos;: settings label for enabling notifications on chat reactions.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -3102,6 +3102,11 @@ Buraya tıklayın: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>chatReactionsNotificationsEnabledLabel</source>
<extracomment>&apos;Enable notifications on reactions&apos;: settings label for enabling notifications on chat reactions.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -3130,6 +3130,11 @@
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>chatReactionsNotificationsEnabledLabel</source>
<extracomment>&apos;Enable notifications on reactions&apos;: settings label for enabling notifications on chat reactions.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -3102,6 +3102,11 @@
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>chatReactionsNotificationsEnabledLabel</source>
<extracomment>&apos;Enable notifications on reactions&apos;: settings label for enabling notifications on chat reactions.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -331,7 +331,7 @@ void CoreHandlers::onNewMessageReaction(const std::shared_ptr<linphone::Core> &
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()

View file

@ -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 {

View file

@ -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. ------------------------------------------------------------------

View file

@ -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 {