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]) {