mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 03:29:20 +03:00
Put sound notifications in SMAudio
This commit is contained in:
parent
78a3b1a5be
commit
df80ff9533
5 changed files with 40 additions and 40 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { SMAudio } from 'Common/Audio';
|
||||
import { SaveSettingsStep } from 'Common/Enums';
|
||||
import { EditorDefaultType, Layout } from 'Common/EnumsUser';
|
||||
import { Settings, SettingsGet } from 'Common/Globals';
|
||||
|
|
@ -35,12 +36,12 @@ export class UserSettingsGeneral extends AbstractViewSettings {
|
|||
this.editorDefaultType = SettingsUserStore.editorDefaultType;
|
||||
this.layout = SettingsUserStore.layout;
|
||||
|
||||
this.soundNotification = NotificationUserStore.enableSoundNotification;
|
||||
this.soundNotification = SMAudio.notifications;
|
||||
this.notificationSound = ko.observable(SettingsGet('NotificationSound'));
|
||||
this.notificationSounds = ko.observableArray(SettingsGet('NewMailSounds'));
|
||||
|
||||
this.desktopNotification = NotificationUserStore.enableDesktopNotification;
|
||||
this.isDesktopNotificationAllowed = NotificationUserStore.isDesktopNotificationAllowed;
|
||||
this.desktopNotification = NotificationUserStore.enabled;
|
||||
this.isDesktopNotificationAllowed = NotificationUserStore.allowed;
|
||||
|
||||
this.viewHTML = SettingsUserStore.viewHTML;
|
||||
this.showImages = SettingsUserStore.showImages;
|
||||
|
|
@ -133,11 +134,11 @@ export class UserSettingsGeneral extends AbstractViewSettings {
|
|||
}
|
||||
|
||||
testSoundNotification() {
|
||||
NotificationUserStore.playSoundNotification(true);
|
||||
SMAudio.playNotification(true);
|
||||
}
|
||||
|
||||
testSystemNotification() {
|
||||
NotificationUserStore.displayDesktopNotification('SnappyMail', 'Test notification');
|
||||
NotificationUserStore.display('SnappyMail', 'Test notification');
|
||||
}
|
||||
|
||||
selectLanguage() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue