mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Added counters of unread messages for additional accounts (#377)
This commit is contained in:
parent
abddb3d828
commit
79233ad83c
19 changed files with 333 additions and 93 deletions
|
|
@ -12,6 +12,7 @@
|
|||
Events = require('Common/Events'),
|
||||
Translator = require('Common/Translator'),
|
||||
|
||||
AccountStore = require('Stores/User/Account'),
|
||||
SettingsStore = require('Stores/User/Settings'),
|
||||
|
||||
Data = require('Storage/User/Data'),
|
||||
|
|
@ -111,8 +112,18 @@
|
|||
SettingsStore.layout.valueHasMutated();
|
||||
}, 50);
|
||||
|
||||
Events.sub('mailbox.inbox-unread-count', function (nCount) {
|
||||
Data.foldersInboxUnreadCount(nCount);
|
||||
Events.sub('mailbox.inbox-unread-count', function (iCount) {
|
||||
|
||||
Data.foldersInboxUnreadCount(iCount);
|
||||
|
||||
var sEmail = Data.accountEmail();
|
||||
|
||||
_.each(AccountStore.accounts(), function (oItem) {
|
||||
if (oItem && sEmail === oItem.email)
|
||||
{
|
||||
oItem.count(iCount);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Data.foldersInboxUnreadCount.subscribe(function () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue