Extract isAudioNotificationEnabled
constant
This commit is contained in:
parent
dc38d40f20
commit
a5a4ed7de7
1 changed files with 8 additions and 4 deletions
|
@ -27,14 +27,18 @@
|
||||||
},
|
},
|
||||||
update: function() {
|
update: function() {
|
||||||
const isFocused = window.isFocused();
|
const isFocused = window.isFocused();
|
||||||
const shouldPlayNotificationSound = Settings.isAudioNotificationSupported() &&
|
const isAudioNotificationEnabled = storage.get('audio-notification') || false;
|
||||||
(storage.get('audio-notification') || false);
|
const isAudioNotificationSupported = Settings.isAudioNotificationSupported();
|
||||||
|
const shouldPlayNotificationSound = isAudioNotificationSupported &&
|
||||||
|
isAudioNotificationEnabled;
|
||||||
const numNotifications = this.length;
|
const numNotifications = this.length;
|
||||||
console.log(
|
console.log(
|
||||||
'updating notifications:',
|
'Update notifications:',
|
||||||
'numNotifications:', numNotifications,
|
|
||||||
'isFocused:', isFocused,
|
'isFocused:', isFocused,
|
||||||
'isEnabled:', isEnabled,
|
'isEnabled:', isEnabled,
|
||||||
|
'numNotifications:', numNotifications,
|
||||||
|
'isAudioNotificationEnabled:', isAudioNotificationEnabled,
|
||||||
|
'isAudioNotificationSupported:', isAudioNotificationSupported,
|
||||||
'shouldPlayNotificationSound:', shouldPlayNotificationSound
|
'shouldPlayNotificationSound:', shouldPlayNotificationSound
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue