File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -352,4 +352,33 @@ fn main_loop(
352352 Cmd :: Exit => {
353353 // Restore everything cleanly before exiting
354354 let mut state = state_shared. lock ( ) . unwrap ( ) ;
355-
355+ profiles:: restore_all ( & mut state) ;
356+ return Ok ( ( ) ) ;
357+ }
358+
359+ Cmd :: UpdateAvailable ( version) => {
360+ let cfg = config_shared. lock ( ) . unwrap ( ) . clone ( ) ;
361+ notifications:: notify_update_available ( & version, & cfg. notifications ) ;
362+ eprintln ! ( "Update available: {version}" ) ;
363+ }
364+
365+ Cmd :: HotkeyFailed ( hotkey) => {
366+ let cfg = config_shared. lock ( ) . unwrap ( ) . clone ( ) ;
367+ notifications:: notify_hotkey_failed ( & hotkey, & cfg. notifications ) ;
368+ }
369+ }
370+ }
371+ }
372+ }
373+
374+ /// Update Discord Rich Presence if enabled.
375+ fn update_discord ( state : & AppState , config : & AppConfig ) {
376+ if config. discord . enabled {
377+ discord:: set_rich_presence (
378+ state. icons_hidden ,
379+ state. taskbar_hidden ,
380+ state. windows_hidden ,
381+ state. active_profile . clone ( ) ,
382+ ) ;
383+ }
384+ }
You can’t perform that action at this time.
0 commit comments