From d1e29e5a27fc3b18768384a1dfae673a0d7d05df Mon Sep 17 00:00:00 2001 From: TheGoddessInari Date: Sun, 15 Sep 2019 08:44:39 -0700 Subject: [PATCH] ServicesList: Update the Slack unread_js to follow mute status. According to Slack itself, muted channels won't notify even on @mention, so respect that. --- 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 6685ca87..8c76f3a5 100644 --- a/app/store/ServicesList.js +++ b/app/store/ServicesList.js @@ -37,7 +37,7 @@ Ext.define('Hamsket.store.ServicesList', { ,description: locale['services[1]'] ,url: 'https://___.slack.com/' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{const indirect=document.querySelectorAll(".p-channel_sidebar__channel--unread:not(.p-channel_sidebar__channel--muted)").length;let direct=0,badges=document.getElementsByClassName("p-channel_sidebar__badge");for(const badge of badges){const i=parseInt(badge.innerHTML);direct+=isNaN(i)?0:i}hamsket.updateBadge(direct,indirect)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const indirectSelector=".p-channel_sidebar__channel--unread:not(.p-channel_sidebar__channel--muted)",indirect=document.querySelectorAll(indirectSelector).length;let direct=0;const badges=document.querySelectorAll(indirectSelector+" > .p-channel_sidebar__badge");for(const badge of badges){const i=parseInt(badge.innerHTML);direct+=isNaN(i)?0:i}hamsket.updateBadge(direct,indirect)};setInterval(checkUnread,3e3);` }, { id: 'noysi'