Minor cleanup
This commit is contained in:
8
Cargo.lock
generated
8
Cargo.lock
generated
@@ -4923,9 +4923,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls"
|
name = "rustls"
|
||||||
version = "0.23.14"
|
version = "0.23.15"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8"
|
checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
@@ -4947,9 +4947,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls-pki-types"
|
name = "rustls-pki-types"
|
||||||
version = "1.9.0"
|
version = "1.10.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55"
|
checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls-webpki"
|
name = "rustls-webpki"
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
|
use tauri_winrt_notification::Toast;
|
||||||
use tokio::sync::broadcast::{Receiver, Sender};
|
use tokio::sync::broadcast::{Receiver, Sender};
|
||||||
use tray_icon::menu::{MenuId, MenuItem};
|
use tray_icon::menu::{MenuId, MenuItem};
|
||||||
use winit::{
|
use winit::{
|
||||||
@@ -142,11 +143,9 @@ impl ApplicationHandler for App {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if !self.config.toast_shown() {
|
if !self.config.toast_shown() {
|
||||||
tauri_winrt_notification::Toast::new(crate::AVAM_APP_ID)
|
let _ = Toast::new(crate::AVAM_APP_ID)
|
||||||
.title("Avam lives in the system tray!")
|
.title("Avam is running in your system tray!")
|
||||||
.text1("(╯°□°)╯︵ ┻━┻")
|
.show();
|
||||||
.show()
|
|
||||||
.expect("unable to toast");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let _ = self.config.set_toast_shown(true);
|
let _ = self.config.set_toast_shown(true);
|
||||||
|
@@ -21,7 +21,7 @@ pub enum State {
|
|||||||
token: String,
|
token: String,
|
||||||
},
|
},
|
||||||
WaitForSim,
|
WaitForSim,
|
||||||
Running,
|
InSim,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
@@ -69,10 +69,10 @@ impl State {
|
|||||||
|
|
||||||
(State::Connect { .. }, Event::Connected) => todo!(), // Goto WaitForSim
|
(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
|
(_, Event::Disconnected) => todo!(), // Goto Connect
|
||||||
(State::Running, Event::SimDisconnected) => todo!(), // Goto WaitForSim
|
(State::InSim, Event::SimDisconnected) => todo!(), // Goto WaitForSim
|
||||||
|
|
||||||
(_, Event::Quit) => todo!(), // All events can go into quit, to shutdown the application
|
(_, Event::Quit) => todo!(), // All events can go into quit, to shutdown the application
|
||||||
|
|
||||||
@@ -115,12 +115,9 @@ impl State {
|
|||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
State::Connect { token } => {
|
State::Connect { .. } => Ok(()),
|
||||||
println!("Holyshit we've got a token: {}", token);
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
State::WaitForSim => Ok(()),
|
State::WaitForSim => Ok(()),
|
||||||
State::Running => Ok(()),
|
State::InSim => Ok(()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user