From ec23e3d0caea3ca4dd12ad8bc202ab15785ac1b2 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Sat, 8 Oct 2022 13:46:27 +0200 Subject: [PATCH] Hide unread count for all system folders, except INBOX. Also solves request for Spam box in #457 --- dev/Model/FolderCollection.js | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/dev/Model/FolderCollection.js b/dev/Model/FolderCollection.js index 62015d42f..326d9e182 100644 --- a/dev/Model/FolderCollection.js +++ b/dev/Model/FolderCollection.js @@ -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: () => {