From 3174c9a07d780eb8f6e2fce8266013f393de40dd Mon Sep 17 00:00:00 2001 From: Alex White Date: Thu, 3 Aug 2017 09:03:51 -0500 Subject: PLT-6823 Removes option to set notification sound in Edge (#6883) * Remove sound notification support for Edge * Move the sound test to utils and also stop the dings for Edge along with firefox * Fix some styling issues * Remove sound notification support for Edge Move the sound test to utils and also stop the dings for Edge along with firefox Fix some styling issues * Reversing soundOptions util method. Fixing some string IDs for clarity * Fixing a syntax error * Restructure HasSoundOptions blocks to not begin with negative statement * Fixing paranthesis --- webapp/utils/utils.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'webapp/utils') diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx index 94f6ca91f..f12fcefba 100644 --- a/webapp/utils/utils.jsx +++ b/webapp/utils/utils.jsx @@ -155,7 +155,7 @@ export function notifyMe(title, body, channel, teamId, duration, silent) { var canDing = true; export function ding() { - if (!UserAgent.isFirefox() && canDing) { + if (hasSoundOptions() && canDing) { var audio = new Audio(bing); audio.play(); canDing = false; @@ -165,6 +165,10 @@ export function ding() { } } +export function hasSoundOptions() { + return (!(UserAgent.isFirefox()) && !(UserAgent.isEdge())); +} + export function getDateForUnixTicks(ticks) { return new Date(ticks); } -- cgit v1.2.3-1-g7c22