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