Neah version mail remove mail correction 5

This commit is contained in:
alma 2025-04-16 20:49:38 +02:00
parent 61d4f19875
commit 1407050052

View File

@ -1554,13 +1554,6 @@ export default function MailPage() {
// Only update unread count when switching to Inbox
if (newMailbox === 'INBOX') {
setUnreadCount(data.unreadCount);
} else {
// Keep the existing unread count when switching to other folders
const inboxResponse = await fetch('/api/mail?folder=INBOX');
if (inboxResponse.ok) {
const inboxData = await inboxResponse.json();
setUnreadCount(inboxData.unreadCount);
}
}
} catch (err) {
setError(err instanceof Error ? err.message : 'Failed to fetch emails');