@@ -103,7 +103,9 @@ fn run() -> Result<()> {
103103 // If the subtraction underflows we fall back to now(), meaning the first check happens
104104 // after one full interval rather than immediately — that's fine.
105105 let interval = Duration :: from_secs ( config. updater . check_interval_h as u64 * 3600 ) ;
106- let mut last_update_check = Instant :: now ( ) . checked_sub ( interval) . unwrap_or_else ( Instant :: now) ;
106+ let mut last_update_check = Instant :: now ( )
107+ . checked_sub ( interval)
108+ . unwrap_or_else ( Instant :: now) ;
107109
108110 main_loop (
109111 cmd_rx,
@@ -350,33 +352,4 @@ fn main_loop(
350352 Cmd :: Exit => {
351353 // Restore everything cleanly before exiting
352354 let mut state = state_shared. lock ( ) . unwrap ( ) ;
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- }
355+
0 commit comments