Better folder unread-count view

This commit is contained in:
djmaze 2021-07-30 12:26:27 +02:00
parent cbecdd93a0
commit 0659b126e7
6 changed files with 31 additions and 56 deletions

View file

@ -280,21 +280,21 @@ export class FolderModel extends AbstractModel {
unread = folder.messageCountUnread(),
type = folder.type();
if (0 < count) {
if (count) {
if (FolderType.Draft === type) {
return '' + count;
return count;
}
if (
0 < unread &&
unread &&
FolderType.Trash !== type &&
FolderType.Archive !== type &&
FolderType.SentItems !== type
) {
return '' + unread;
return unread;
}
}
return '';
return null;
},
canBeDeleted: () => !folder.isSystemFolder() && !folder.subFolders.length,