From 9e5c2cb92eddd6f9f80ba25331919fbd2bf49482 Mon Sep 17 00:00:00 2001 From: alma Date: Wed, 30 Apr 2025 23:54:43 +0200 Subject: [PATCH] courrier preview --- components/email/EmailSidebar.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/email/EmailSidebar.tsx b/components/email/EmailSidebar.tsx index 40457226..a3c6faae 100644 --- a/components/email/EmailSidebar.tsx +++ b/components/email/EmailSidebar.tsx @@ -173,7 +173,9 @@ export default function EmailSidebar({ let folderUnreadCount = 0; // Check if this is an inbox folder (only show unread counts for inbox folders) - const isInboxFolder = baseFolderName.toLowerCase().includes('inbox'); + // Use exact matching instead of includes() to avoid matching substrings in folder names + const folderLower = baseFolderName.toLowerCase(); + const isInboxFolder = folderLower === 'inbox'; // Only calculate unread count for inbox folders if (isInboxFolder && unreadCount && unreadCount[accountId]) {