Minor cleanup

This commit is contained in:
2024-10-17 22:04:36 +02:00
parent 4c88ca0685
commit ea88c755b5
3 changed files with 14 additions and 18 deletions

View File

@@ -1,5 +1,6 @@
use std::collections::HashMap;
use tauri_winrt_notification::Toast;
use tokio::sync::broadcast::{Receiver, Sender};
use tray_icon::menu::{MenuId, MenuItem};
use winit::{
@@ -142,11 +143,9 @@ impl ApplicationHandler for App {
});
if !self.config.toast_shown() {
tauri_winrt_notification::Toast::new(crate::AVAM_APP_ID)
.title("Avam lives in the system tray!")
.text1("(╯°□°)╯︵ ┻━┻")
.show()
.expect("unable to toast");
let _ = Toast::new(crate::AVAM_APP_ID)
.title("Avam is running in your system tray!")
.show();
}
let _ = self.config.set_toast_shown(true);

View File

@@ -21,7 +21,7 @@ pub enum State {
token: String,
},
WaitForSim,
Running,
InSim,
}
#[derive(Debug, Clone, PartialEq)]
@@ -69,10 +69,10 @@ impl State {
(State::Connect { .. }, Event::Connected) => todo!(), // Goto WaitForSim
(State::WaitForSim, Event::SimConnected) => todo!(), // Goto Running
(State::WaitForSim, Event::SimConnected) => todo!(), // Goto InSim
(State::Running, Event::Disconnected) => todo!(), // Goto Connect
(State::Running, Event::SimDisconnected) => todo!(), // Goto WaitForSim
(_, Event::Disconnected) => todo!(), // Goto Connect
(State::InSim, Event::SimDisconnected) => todo!(), // Goto WaitForSim
(_, Event::Quit) => todo!(), // All events can go into quit, to shutdown the application
@@ -115,12 +115,9 @@ impl State {
Ok(())
}
State::Connect { token } => {
println!("Holyshit we've got a token: {}", token);
Ok(())
}
State::Connect { .. } => Ok(()),
State::WaitForSim => Ok(()),
State::Running => Ok(()),
State::InSim => Ok(()),
}
}
}