diff --git a/Cargo.lock b/Cargo.lock index a5e2a66..bc6d8b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -396,7 +396,6 @@ dependencies = [ "rodio", "serde", "toml", - "winrt-notification", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f34213e..d508859 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,13 +12,7 @@ async-std = "1.6.2" clap = "2.33.1" crossterm = "0.17.5" directories = "3.0.0" +notify-rust = "4.0.0" rodio = "0.11.0" serde = { version = "1.0.114", features = ["derive"] } toml = "0.5.6" - -[target.'cfg(windows)'.dependencies] -# winrt = "0.7.0" -winrt-notification = "0.2.2" - -[target.'cfg(any(target_os = "macos", target_os = "linux"))'.dependencies] -notify-rust = "4.0.0" diff --git a/src/pomodoro.rs b/src/pomodoro.rs index b05e93b..8174888 100644 --- a/src/pomodoro.rs +++ b/src/pomodoro.rs @@ -144,7 +144,6 @@ impl Pomodoro { tx.send(status).unwrap(); } - #[cfg(any(target_os = "macos", target_os = "linux"))] fn notify(state: &State) { let mut toast = notify_rust::Notification::new(); @@ -172,43 +171,6 @@ impl Pomodoro { } } } - - #[cfg(target_os = "windows")] - fn notify(state: &State) { - use winrt_notification::{Duration, Sound, Toast}; - - let toast = Toast::new(Toast::POWERSHELL_APP_ID); - - match state { - State::Work => { - toast - .title("Time to Work!") - .text1("Remember to stay focused!") - .sound(Some(Sound::Default)) - .duration(Duration::Short) - .show() - .unwrap(); - } - State::ShortBreak | State::LongBreak => { - toast - .title("Break Time!") - .text1("Enjoy your well deserved rest!") - .sound(Some(Sound::Default)) - .duration(Duration::Short) - .show() - .unwrap(); - } - State::Inactive => { - toast - .title("Pomodoro Cycle Complete.") - .text1("Now waiting for user input....") - .sound(Some(Sound::Default)) - .duration(Duration::Short) - .show() - .unwrap(); - } - } - } } #[derive(Copy, Clone, Debug)]