diff --git a/components/email/EmailSidebar.tsx b/components/email/EmailSidebar.tsx index b5fbf30b..40457226 100644 --- a/components/email/EmailSidebar.tsx +++ b/components/email/EmailSidebar.tsx @@ -172,8 +172,11 @@ export default function EmailSidebar({ // Get unread count - check all possible formats let folderUnreadCount = 0; - // First check if account exists in the map - if (unreadCount && unreadCount[accountId]) { + // Check if this is an inbox folder (only show unread counts for inbox folders) + const isInboxFolder = baseFolderName.toLowerCase().includes('inbox'); + + // Only calculate unread count for inbox folders + if (isInboxFolder && unreadCount && unreadCount[accountId]) { // Try the base folder name first if (typeof unreadCount[accountId][baseFolderName] === 'number') { folderUnreadCount = unreadCount[accountId][baseFolderName]; @@ -212,7 +215,7 @@ export default function EmailSidebar({
{getFolderIcon(baseFolderName)} {formatFolderName(baseFolderName)} - {folderUnreadCount > 0 && ( + {isInboxFolder && folderUnreadCount > 0 && ( {folderUnreadCount}