From 5a4773fee752a53be8c5a959f551db5211da52cb Mon Sep 17 00:00:00 2001 From: Daniel Gasienica Date: Mon, 26 Feb 2018 13:28:04 -0500 Subject: [PATCH] Only play audio notification on supported platforms --- js/notifications.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/notifications.js b/js/notifications.js index 731a33276..08d9ecdfa 100644 --- a/js/notifications.js +++ b/js/notifications.js @@ -5,6 +5,7 @@ ;(function() { 'use strict'; window.Whisper = window.Whisper || {}; + const { Settings } = window.Signal.Types; var SETTINGS = { OFF : 'off', @@ -26,8 +27,8 @@ }, update: function() { const isFocused = window.isFocused(); - const shouldPlayNotificationSound = - storage.get('audio-notification') || false; + const shouldPlayNotificationSound = Settings.isAudioNotificationSupported() && + (storage.get('audio-notification') || false); const numNotifications = this.length; console.log( 'updating notifications:',