diff --git a/Store.js b/Store.js index 6582dd3..e7cc51f 100644 --- a/Store.js +++ b/Store.js @@ -122,11 +122,12 @@ var Store = module.exports = { { let icon = (account.folderTypes[f.name] ? 'mail_'+account.folderTypes[f.name] : 'folder'); account.folders.push({ name: f.name, icon: icon, unreadCount: f.unread_count-0, folderId: f.id }); - account.folders[0].unreadCount -= -f.unread_count; + account.folders[0].unreadCount += (f.unread_count-0); if (account.folderTypes[f.name]) { - accounts[0].folders[ixOfAll[account.folderTypes[f.name]]].unreadCount -= -f.unread_count; + accounts[0].folders[ixOfAll[account.folderTypes[f.name]]].unreadCount += (f.unread_count-0); } + account.unreadCount += (f.unread_count-0); } accounts.push(account); accounts[0].unreadCount += account.unreadCount;