From f1ed3ad659b863277cc47a2d752e3a0f4b614fdc Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 21 Jan 2016 21:26:05 -0500 Subject: [PATCH] allowing favicon updating to be disabled via client side hook --- public/src/modules/notifications.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/public/src/modules/notifications.js b/public/src/modules/notifications.js index e8649248e0..08b3bea560 100644 --- a/public/src/modules/notifications.js +++ b/public/src/modules/notifications.js @@ -122,10 +122,15 @@ define('notifications', ['sounds', 'translator', 'components'], function(sound, notifIcon.toggleClass('unread-count', count > 0); notifIcon.attr('data-content', count > 20 ? '20+' : count); - Tinycon.setBubble(count); - $(window).trigger('action:notification.updateCount', { - count: count - }); + var payload = { + count: count, + updateFavicon: true + }; + $(window).trigger('action:notification.updateCount', payload); + + if (payload.updateFavicon) { + Tinycon.setBubble(count); + } }; Notifications.markAllRead = function() {