diff --git a/src/renderer/context/App.tsx b/src/renderer/context/App.tsx index 86e1ffea8..9310380c2 100644 --- a/src/renderer/context/App.tsx +++ b/src/renderer/context/App.tsx @@ -189,7 +189,9 @@ export const AppProvider = ({ children }: { children: ReactNode }) => { useEffect(() => { setUseUnreadActiveIcon(settings.useUnreadActiveIcon); setUseAlternateIdleIcon(settings.useAlternateIdleIcon); - setTrayIconColorAndTitle(unreadNotificationCount, settings); + + const trayCount = status === 'error' ? -1 : unreadNotificationCount; + setTrayIconColorAndTitle(trayCount, settings); }, [ settings.showNotificationsCountInTray, settings.useUnreadActiveIcon, diff --git a/src/renderer/hooks/useNotifications.ts b/src/renderer/hooks/useNotifications.ts index 2758e593f..e8076bb14 100644 --- a/src/renderer/hooks/useNotifications.ts +++ b/src/renderer/hooks/useNotifications.ts @@ -13,7 +13,6 @@ import { markNotificationThreadAsDone, markNotificationThreadAsRead, } from '../utils/api/client'; -import { updateTrayColor } from '../utils/comms'; import { areAllAccountErrorsSame, doesAllAccountsHaveErrors, @@ -91,7 +90,6 @@ export const useNotifications = (): NotificationsState => { const accountError = fetchedNotifications[0].error; setStatus('error'); setGlobalError(allAccountErrorsAreSame ? accountError : null); - updateTrayColor(-1); return; }