Hide unread count for all system folders, except INBOX.

Also solves request for Spam box in #457
This commit is contained in:
the-djmaze 2022-10-08 13:46:27 +02:00
parent 81a5466f50
commit ec23e3d0ca

View file

@ -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: () => {