mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-26 16:26:44 +03:00
Hide unread count for all system folders, except INBOX.
Also solves request for Spam box in #457
This commit is contained in:
parent
81a5466f50
commit
ec23e3d0ca
1 changed files with 2 additions and 17 deletions
|
|
@ -394,25 +394,10 @@ export class FolderModel extends AbstractModel {
|
|||
},
|
||||
|
||||
printableUnreadCount: () => {
|
||||
const count = folder.totalEmails(),
|
||||
const
|
||||
unread = folder.unreadEmails(),
|
||||
type = folder.type();
|
||||
|
||||
if (count) {
|
||||
if (FolderType.Drafts === type) {
|
||||
return count;
|
||||
}
|
||||
if (
|
||||
unread &&
|
||||
FolderType.Trash !== type &&
|
||||
FolderType.Archive !== type &&
|
||||
FolderType.Sent !== type
|
||||
) {
|
||||
return unread;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
return ((!folder.isSystemFolder() || type == FolderType.Inbox) && unread) ? unread : null;
|
||||
},
|
||||
|
||||
localName: () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue