Browse Source

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.
pull/1853/head
Álvaro Brey 7 years ago
parent
commit
877d057bef
No known key found for this signature in database
GPG Key ID: EE91DFFA3AA383BF
  1. 2
      app/store/ServicesList.js

2
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. <a href="https://github.com/saenzramiro/rambox/wiki/Inbox" target="_blank">Read more...</a>'
},
{

Loading…
Cancel
Save