mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Convert user stores to single object instances
Removed unused ContactUserStore.exportingCsv and ContactUserStore.exportingVcf
This commit is contained in:
parent
914c6e8d14
commit
6a454ec624
46 changed files with 671 additions and 710 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import Audio from 'Common/Audio';
|
||||
import { SMAudio } from 'Common/Audio';
|
||||
import { SettingsGet } from 'Common/Globals';
|
||||
import * as Links from 'Common/Links';
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ if (WorkerNotifications && ServiceWorkerRegistration && ServiceWorkerRegistratio
|
|||
console.log('ServiceWorker Notifications not supported');
|
||||
}
|
||||
|
||||
class NotificationUserStore {
|
||||
export const NotificationUserStore = new class {
|
||||
constructor() {
|
||||
this.enableSoundNotification = ko.observable(false);
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ class NotificationUserStore {
|
|||
*/
|
||||
playSoundNotification(skipSetting) {
|
||||
if (skipSetting ? true : this.enableSoundNotification()) {
|
||||
Audio.playNotification();
|
||||
SMAudio.playNotification();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -106,6 +106,4 @@ class NotificationUserStore {
|
|||
this.enableSoundNotification(!!SettingsGet('SoundNotification'));
|
||||
this.enableDesktopNotification(!!SettingsGet('DesktopNotifications'));
|
||||
}
|
||||
}
|
||||
|
||||
export default new NotificationUserStore();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue