Minor cleanup
This commit is contained in:
@@ -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);
|
||||
|
@@ -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(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user