diff options
author | Alex White <Whiteaj36@users.noreply.github.com> | 2017-08-03 09:03:51 -0500 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-08-03 10:03:51 -0400 |
commit | 3174c9a07d780eb8f6e2fce8266013f393de40dd (patch) | |
tree | 672f123ccccbf2cd134621f7f0253e7dd3341ba1 /webapp/utils/utils.jsx | |
parent | ea095d6206ad8bb9b1b1ffbf74584669a24f1ca8 (diff) | |
download | chat-3174c9a07d780eb8f6e2fce8266013f393de40dd.tar.gz chat-3174c9a07d780eb8f6e2fce8266013f393de40dd.tar.bz2 chat-3174c9a07d780eb8f6e2fce8266013f393de40dd.zip |
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
Diffstat (limited to 'webapp/utils/utils.jsx')
-rw-r--r-- | webapp/utils/utils.jsx | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |