@@ -45,7 +45,6 @@ import {
4545 setKeyboardShortcut ,
4646 setUseAlternateIdleIcon ,
4747 setUseUnreadActiveIcon ,
48- updateTrayIcon ,
4948 updateTrayTitle ,
5049} from '../utils/comms' ;
5150import { getNotificationCount } from '../utils/notifications/notifications' ;
@@ -69,11 +68,13 @@ interface AppContextState {
6968 ) => Promise < void > ;
7069 logoutFromAccount : ( account : Account ) => Promise < void > ;
7170
72- notifications : AccountNotifications [ ] ;
7371 status : Status ;
7472 globalError : GitifyError ;
75- removeAccountNotifications : ( account : Account ) => Promise < void > ;
73+
74+ notifications : AccountNotifications [ ] ;
7675 fetchNotifications : ( ) => Promise < void > ;
76+ removeAccountNotifications : ( account : Account ) => Promise < void > ;
77+
7778 markNotificationsAsRead : ( notifications : Notification [ ] ) => Promise < void > ;
7879 markNotificationsAsDone : ( notifications : Notification [ ] ) => Promise < void > ;
7980 unsubscribeNotification : ( notification : Notification ) => Promise < void > ;
@@ -106,6 +107,7 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
106107 unsubscribeNotification,
107108 } = useNotifications ( ) ;
108109
110+ // biome-ignore lint/correctness/useExhaustiveDependencies: restoreSettings is stable and should run only once
109111 useEffect ( ( ) => {
110112 restoreSettings ( ) ;
111113 } , [ ] ) ;
@@ -164,13 +166,9 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
164166
165167 setUseUnreadActiveIcon ( settings . useUnreadActiveIcon ) ;
166168
167- updateTrayIcon ( count ) ;
169+ updateTrayTitle ( count . toString ( ) ) ;
168170 } , [ settings . useUnreadActiveIcon , notifications ] ) ;
169171
170- useEffect ( ( ) => {
171- setAutoLaunch ( settings . openAtStartup ) ;
172- } , [ settings . openAtStartup ] ) ;
173-
174172 useEffect ( ( ) => {
175173 setUseAlternateIdleIcon ( settings . useAlternateIdleIcon ) ;
176174 } , [ settings . useAlternateIdleIcon ] ) ;
@@ -179,6 +177,10 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
179177 setKeyboardShortcut ( settings . keyboardShortcut ) ;
180178 } , [ settings . keyboardShortcut ] ) ;
181179
180+ useEffect ( ( ) => {
181+ setAutoLaunch ( settings . openAtStartup ) ;
182+ } , [ settings . openAtStartup ] ) ;
183+
182184 useEffect ( ( ) => {
183185 window . gitify . onResetApp ( ( ) => {
184186 clearState ( ) ;
@@ -277,9 +279,9 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
277279
278280 // Restore settings before accounts to ensure filters are available before fetching notifications
279281 if ( existing . settings ) {
280- setKeyboardShortcut ( existing . settings . keyboardShortcut ) ;
281282 setUseUnreadActiveIcon ( existing . settings . useUnreadActiveIcon ) ;
282283 setUseAlternateIdleIcon ( existing . settings . useAlternateIdleIcon ) ;
284+ setKeyboardShortcut ( existing . settings . keyboardShortcut ) ;
283285 setSettings ( { ...defaultSettings , ...existing . settings } ) ;
284286 window . gitify . zoom . setLevel (
285287 zoomPercentageToLevel ( existing . settings . zoomPercentage ) ,
0 commit comments