Custom new mail notification sounds

This commit is contained in:
djmaze 2021-07-21 11:19:52 +02:00
parent ee540097b4
commit 7ab832e854
9 changed files with 20 additions and 5 deletions

View file

@ -32,6 +32,8 @@ export class GeneralUserSettings {
this.layout = SettingsUserStore.layout;
this.enableSoundNotification = NotificationUserStore.enableSoundNotification;
this.notificationSound = ko.observable(SettingsGet('NotificationSound'));
this.notificationSounds = ko.observableArray(SettingsGet('NewMailSounds'));
this.enableDesktopNotification = NotificationUserStore.enableDesktopNotification;
this.isDesktopNotificationDenied = NotificationUserStore.isDesktopNotificationDenied;
@ -115,6 +117,10 @@ export class GeneralUserSettings {
enableDesktopNotification: value => Remote.saveSetting('DesktopNotifications', value ? 1 : 0),
enableSoundNotification: value => Remote.saveSetting('SoundNotification', value ? 1 : 0),
notificationSound: value => {
Remote.saveSetting('NotificationSound', value);
rl.settings.set('NotificationSound', value);
},
replySameFolder: value => Remote.saveSetting('ReplySameFolder', value ? 1 : 0),