@@ -45,7 +45,6 @@ import {
45
45
setKeyboardShortcut ,
46
46
setUseAlternateIdleIcon ,
47
47
setUseUnreadActiveIcon ,
48
- updateTrayIcon ,
49
48
updateTrayTitle ,
50
49
} from '../utils/comms' ;
51
50
import { getNotificationCount } from '../utils/notifications/notifications' ;
@@ -69,11 +68,13 @@ interface AppContextState {
69
68
) => Promise < void > ;
70
69
logoutFromAccount : ( account : Account ) => Promise < void > ;
71
70
72
- notifications : AccountNotifications [ ] ;
73
71
status : Status ;
74
72
globalError : GitifyError ;
75
- removeAccountNotifications : ( account : Account ) => Promise < void > ;
73
+
74
+ notifications : AccountNotifications [ ] ;
76
75
fetchNotifications : ( ) => Promise < void > ;
76
+ removeAccountNotifications : ( account : Account ) => Promise < void > ;
77
+
77
78
markNotificationsAsRead : ( notifications : Notification [ ] ) => Promise < void > ;
78
79
markNotificationsAsDone : ( notifications : Notification [ ] ) => Promise < void > ;
79
80
unsubscribeNotification : ( notification : Notification ) => Promise < void > ;
@@ -106,6 +107,7 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
106
107
unsubscribeNotification,
107
108
} = useNotifications ( ) ;
108
109
110
+ // biome-ignore lint/correctness/useExhaustiveDependencies: restoreSettings is stable and should run only once
109
111
useEffect ( ( ) => {
110
112
restoreSettings ( ) ;
111
113
} , [ ] ) ;
@@ -164,13 +166,9 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
164
166
165
167
setUseUnreadActiveIcon ( settings . useUnreadActiveIcon ) ;
166
168
167
- updateTrayIcon ( count ) ;
169
+ updateTrayTitle ( count . toString ( ) ) ;
168
170
} , [ settings . useUnreadActiveIcon , notifications ] ) ;
169
171
170
- useEffect ( ( ) => {
171
- setAutoLaunch ( settings . openAtStartup ) ;
172
- } , [ settings . openAtStartup ] ) ;
173
-
174
172
useEffect ( ( ) => {
175
173
setUseAlternateIdleIcon ( settings . useAlternateIdleIcon ) ;
176
174
} , [ settings . useAlternateIdleIcon ] ) ;
@@ -179,6 +177,10 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
179
177
setKeyboardShortcut ( settings . keyboardShortcut ) ;
180
178
} , [ settings . keyboardShortcut ] ) ;
181
179
180
+ useEffect ( ( ) => {
181
+ setAutoLaunch ( settings . openAtStartup ) ;
182
+ } , [ settings . openAtStartup ] ) ;
183
+
182
184
useEffect ( ( ) => {
183
185
window . gitify . onResetApp ( ( ) => {
184
186
clearState ( ) ;
@@ -277,9 +279,9 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
277
279
278
280
// Restore settings before accounts to ensure filters are available before fetching notifications
279
281
if ( existing . settings ) {
280
- setKeyboardShortcut ( existing . settings . keyboardShortcut ) ;
281
282
setUseUnreadActiveIcon ( existing . settings . useUnreadActiveIcon ) ;
282
283
setUseAlternateIdleIcon ( existing . settings . useAlternateIdleIcon ) ;
284
+ setKeyboardShortcut ( existing . settings . keyboardShortcut ) ;
283
285
setSettings ( { ...defaultSettings , ...existing . settings } ) ;
284
286
window . gitify . zoom . setLevel (
285
287
zoomPercentageToLevel ( existing . settings . zoomPercentage ) ,
0 commit comments