From bc8517703a3e22c8e41423ab1099ee44b8813046 Mon Sep 17 00:00:00 2001 From: James Riley Date: Fri, 18 Aug 2017 11:41:35 -0700 Subject: [PATCH] Fixed Slack notifications - Slack got rid of the .unread_msgs and .unread_highlights selectors - This uses the selectors currently available to determine if there are any unreads, as well as the selector on the highlight badge to find a count of unread highlights. --- app/store/ServicesList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/store/ServicesList.js b/app/store/ServicesList.js index 915f6147..6d85e19d 100644 --- a/app/store/ServicesList.js +++ b/app/store/ServicesList.js @@ -38,7 +38,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: locale['services[1]'] ,url: 'https://___.slack.com/' ,type: 'messaging' - ,js_unread: 'function checkUnread(){var a=0,b=0;$(".unread_msgs").each(function(){a+=isNaN(parseInt($(this).html())) ? 0 : parseInt($(this).html())}),$(".unread_highlights").each(function(){b+=isNaN(parseInt($(this).html())) ? 0 : parseInt($(this).html())}),updateBadge(a,b)}function updateBadge(a,b){var c=b>0?"("+b+") ":a>0?"(•) ":"";document.title=c+originalTitle}var originalTitle=document.title;setInterval(checkUnread,3000);' + ,js_unread: 'function checkUnread(){var e=$(".p-channel_sidebar__channel--unread").length,a=0;$(".p-channel_sidebar__badge").each(function(){a+=isNaN(parseInt($(this).html()))?0:parseInt($(this).html())}),updateBadge(e,a)}function updateBadge(e,a){var n=a>0?"("+a+") ":e>0?"(•) ":"";document.title=n+originalTitle}var originalTitle=document.title;setInterval(checkUnread,3e3);' }, { id: 'noysi'