mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-06 20:37:14 +00:00
(fix) refactored code and we now return the unseenCount when fetching uids
This commit is contained in:
1 parent
40d269c504
commit
0c7bdac091
6 files changed
+40
-30
No files matched your search
@@ -232,7 +232,7 @@
|
||||
if (!_.includes(unseenCountFolders, account.id + '/folderINBOX'))
|
||||
unseenCountFolders.push(account.id + '/folderINBOX');
|
||||
|
||||
_.forEach(account.$mailboxes, function(mailbox) {
|
||||
_.forEach(account.$$flattenMailboxes, function(mailbox) {
|
||||
if (angular.isDefined(mailbox.unseenCount) &&
|
||||
!_.includes(unseenCountFolders, mailbox.id))
|
||||
unseenCountFolders.push(mailbox.id);
|
||||
@@ -241,7 +241,7 @@
|
||||
|
||||
Account.$$resource.post('', 'unseenCount', {mailboxes: unseenCountFolders}).then(function(data) {
|
||||
_.forEach(vm.accounts, function(account) {
|
||||
_.forEach(account.$mailboxes, function(mailbox) {
|
||||
_.forEach(account.$$flattenMailboxes, function(mailbox) {
|
||||
if (data[mailbox.id])
|
||||
mailbox.unseenCount = data[mailbox.id];
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user