From 877d057befba0da15171f020d0d03e3cd99151b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Brey?= Date: Wed, 12 Sep 2018 13:51:20 +0200 Subject: [PATCH] Inbox: only update unread count if the current view is the Inbox view. Currently the unread badges are updated in any Inbox 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. --- 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 d6524358..d39c4a0b 100644 --- a/app/store/ServicesList.js +++ b/app/store/ServicesList.js @@ -124,7 +124,7 @@ Ext.define('Rambox.store.ServicesList', { ,url: 'https://inbox.google.com/?cid=imp' ,type: 'email' ,manual_notifications: true - ,js_unread: 'function checkUnread(){updateBadge(document.getElementsByClassName("ss").length)}function updateBadge(a){a>=1?document.title="("+a+") "+originalTitle:document.title=originalTitle}var originalTitle=document.title;setInterval(checkUnread,3e3);' + ,js_unread: 'function checkUnread() {if(getComputedStyle(document.getElementsByClassName("sM")[0])["font-weight"] == "bold"){updateBadge(document.getElementsByClassName("ss").length)}} function updateBadge(a){a>=1?document.title="("+a+") "+originalTitle:document.title=originalTitle}var originalTitle=document.title;setInterval(checkUnread,3e3);' ,note: 'Please be sure to sign out of Hangouts inside Inbox, as it causes problems. Read more...' }, {