From eff6783145f889ced086207c0c4756c6fd2498a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Brey?= Date: Fri, 14 Sep 2018 12:31:10 +0200 Subject: [PATCH] Inbox: only update notification badge for Inbox view. Currently the unread badges are updated in any view (such as Done, Snoozed or any folder). These are not unread/new messages and as such should not count towards the badge. This patch works around that issue by checking if the current view is the Inbox view, and not updating the unread count otherwise. See: https://github.com/ramboxapp/community-edition/issues/1136, https://github.com/ramboxapp/community-edition/pull/1853 --- 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 f2b746cb..ee1b7bfa 100644 --- a/app/store/ServicesList.js +++ b/app/store/ServicesList.js @@ -125,7 +125,7 @@ Ext.define('Rambox.store.ServicesList', { ,url: 'https://inbox.google.com/?cid=imp' ,type: 'email' ,manual_notifications: true - ,js_unread: `let checkUnread=()=>{rambox.updateBadge(document.getElementsByClassName("ss").length)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{if(getComputedStyle(document.getElementsByClassName("sM")[0])["font-weight"] == "bold"){rambox.updateBadge(document.getElementsByClassName("ss").length)}};setInterval(checkUnread,3e3);` ,note: 'Please be sure to sign out of Hangouts inside Inbox, as it causes problems. Read more...' }, {