Skip to content

Commit ad659fb

Browse files
committed
v1.0.3
1 parent 1c362eb commit ad659fb

1 file changed

Lines changed: 30 additions & 1 deletion

File tree

src/main.rs

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff 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+
}

0 commit comments

Comments
 (0)