mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +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: () => {
|
printableUnreadCount: () => {
|
||||||
const count = folder.totalEmails(),
|
const
|
||||||
unread = folder.unreadEmails(),
|
unread = folder.unreadEmails(),
|
||||||
type = folder.type();
|
type = folder.type();
|
||||||
|
return ((!folder.isSystemFolder() || type == FolderType.Inbox) && unread) ? unread : null;
|
||||||
if (count) {
|
|
||||||
if (FolderType.Drafts === type) {
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
unread &&
|
|
||||||
FolderType.Trash !== type &&
|
|
||||||
FolderType.Archive !== type &&
|
|
||||||
FolderType.Sent !== type
|
|
||||||
) {
|
|
||||||
return unread;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
localName: () => {
|
localName: () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue