Skip to content

Commit 94a8f00

Browse files
authored
fix: tray color error (#2386)
Signed-off-by: Adam Setch <adam.setch@outlook.com>
1 parent 24d4998 commit 94a8f00

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/renderer/context/App.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
189189
useEffect(() => {
190190
setUseUnreadActiveIcon(settings.useUnreadActiveIcon);
191191
setUseAlternateIdleIcon(settings.useAlternateIdleIcon);
192-
setTrayIconColorAndTitle(unreadNotificationCount, settings);
192+
193+
const trayCount = status === 'error' ? -1 : unreadNotificationCount;
194+
setTrayIconColorAndTitle(trayCount, settings);
193195
}, [
194196
settings.showNotificationsCountInTray,
195197
settings.useUnreadActiveIcon,

src/renderer/hooks/useNotifications.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
markNotificationThreadAsDone,
1414
markNotificationThreadAsRead,
1515
} from '../utils/api/client';
16-
import { updateTrayColor } from '../utils/comms';
1716
import {
1817
areAllAccountErrorsSame,
1918
doesAllAccountsHaveErrors,
@@ -91,7 +90,6 @@ export const useNotifications = (): NotificationsState => {
9190
const accountError = fetchedNotifications[0].error;
9291
setStatus('error');
9392
setGlobalError(allAccountErrorsAreSame ? accountError : null);
94-
updateTrayColor(-1);
9593
return;
9694
}
9795

0 commit comments

Comments
 (0)