From 762b2f61aae4d7285a64f0f64cfab6d28a3bd90a Mon Sep 17 00:00:00 2001 From: Ian Mason Date: Sat, 28 Jan 2023 23:57:51 -0800 Subject: [PATCH] Version 4.0.1 Fix updater not installing new versions --- Cargo.toml | 2 +- src/main.rs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cc788ac..8a98899 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "town-of-us-updater" -version = "4.0.0" +version = "4.0.1" edition = "2021" build = "src/build.rs" diff --git a/src/main.rs b/src/main.rs index 85a04f8..a9ccee5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -285,6 +285,10 @@ async fn _get_latest_updater_version() -> Result<(String, String), reqwest::Erro impl AppData { fn on_path_added(&mut self) { + if self.among_us_path.is_empty() { + return; + } + if let Some(among_us_version) = determine_among_us_version(String::from(self.among_us_path.clone())) { @@ -541,11 +545,10 @@ fn main() { launch_better_crewlink().unwrap_or(()); - // let app_launcher = AppLauncher::with_window(main_window).delegate(Delegate {}); - // app_launcher.launch(app_data).unwrap(); let mut native_options = eframe::NativeOptions::default(); native_options.min_window_size = Some(egui::vec2(425.0, 400.0)); native_options.initial_window_size = Some(egui::vec2(425.0, 400.0)); + app_data.on_path_added(); app_data.detect_installs(); // Initial check since we only update every 10s eframe::run_native( title_string.as_str(),