From 5fc7211adbbdb2e8c4c387a3eb4d326defe7c9cb Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Sat, 23 Nov 2019 18:24:53 -0500 Subject: [PATCH] fix order --- src/app/services/user-notification.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/services/user-notification.service.ts b/src/app/services/user-notification.service.ts index ede222cd..028ecfe3 100644 --- a/src/app/services/user-notification.service.ts +++ b/src/app/services/user-notification.service.ts @@ -92,9 +92,7 @@ export class UserNotificationService { private setNotificationSound() { let settings = this.toolsService.getSettings(); - let soundId = settings.notificationSoundFileId; - - if(this.soundFileId === soundId) return; + let soundId = settings.notificationSoundFileId; if(!soundId){ soundId = '0'; @@ -102,6 +100,8 @@ export class UserNotificationService { this.toolsService.saveSettings(settings); } + if(this.soundFileId === soundId) return; + var sound = this.getAllNotificationSounds().find(x => x.id === soundId); this.sound = new Howl({ src: [sound.path]