Merge pull request #197 from NicolasConstant/develop

fix order init sound
This commit is contained in:
Nicolas Constant 2019-11-23 18:25:32 -05:00 committed by GitHub
commit 6730de097c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -92,9 +92,7 @@ export class UserNotificationService {
private setNotificationSound() { private setNotificationSound() {
let settings = this.toolsService.getSettings(); let settings = this.toolsService.getSettings();
let soundId = settings.notificationSoundFileId; let soundId = settings.notificationSoundFileId;
if(this.soundFileId === soundId) return;
if(!soundId){ if(!soundId){
soundId = '0'; soundId = '0';
@ -102,6 +100,8 @@ export class UserNotificationService {
this.toolsService.saveSettings(settings); this.toolsService.saveSettings(settings);
} }
if(this.soundFileId === soundId) return;
var sound = this.getAllNotificationSounds().find(x => x.id === soundId); var sound = this.getAllNotificationSounds().find(x => x.id === soundId);
this.sound = new Howl({ this.sound = new Howl({
src: [sound.path] src: [sound.path]