Only play audio notification on supported platforms
This commit is contained in:
parent
85b121aca4
commit
5a4773fee7
1 changed files with 3 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
||||||
;(function() {
|
;(function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
window.Whisper = window.Whisper || {};
|
window.Whisper = window.Whisper || {};
|
||||||
|
const { Settings } = window.Signal.Types;
|
||||||
|
|
||||||
var SETTINGS = {
|
var SETTINGS = {
|
||||||
OFF : 'off',
|
OFF : 'off',
|
||||||
|
@ -26,8 +27,8 @@
|
||||||
},
|
},
|
||||||
update: function() {
|
update: function() {
|
||||||
const isFocused = window.isFocused();
|
const isFocused = window.isFocused();
|
||||||
const shouldPlayNotificationSound =
|
const shouldPlayNotificationSound = Settings.isAudioNotificationSupported() &&
|
||||||
storage.get('audio-notification') || false;
|
(storage.get('audio-notification') || false);
|
||||||
const numNotifications = this.length;
|
const numNotifications = this.length;
|
||||||
console.log(
|
console.log(
|
||||||
'updating notifications:',
|
'updating notifications:',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue