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

8
Cargo.lock generated
View File

@@ -4923,9 +4923,9 @@ dependencies = [
[[package]]
name = "rustls"
version = "0.23.14"
version = "0.23.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8"
checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993"
dependencies = [
"log",
"once_cell",
@@ -4947,9 +4947,9 @@ dependencies = [
[[package]]
name = "rustls-pki-types"
version = "1.9.0"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55"
checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b"
[[package]]
name = "rustls-webpki"

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(()),
}
}
}