diff --git a/src-tauri/src/updates.rs b/src-tauri/src/updates.rs index e65c25ab..2b75e58f 100644 --- a/src-tauri/src/updates.rs +++ b/src-tauri/src/updates.rs @@ -1,7 +1,7 @@ use std::fmt::{Display, Formatter}; use std::time::SystemTime; -use log::info; +use log::{debug, info}; use tauri::AppHandle; use tauri_plugin_dialog::DialogExt; use tauri_plugin_updater::UpdaterExt; @@ -53,13 +53,8 @@ impl YaakUpdater { ) -> Result { self.last_update_check = SystemTime::now(); - let enabled = !is_dev(); - info!("Checking for updates mode={} enabled={}", mode, enabled); + info!("Checking for updates mode={}", mode); - if !enabled { - return Ok(false); - } - let update_check_result = app_handle .updater_builder() .header("X-Update-Mode", mode.to_string())? @@ -121,6 +116,12 @@ impl YaakUpdater { return Ok(false); } + // Don't check if dev + if is_dev() { + debug!("Not checking for updates in dev"); + return Ok(false); + } + self.force_check(app_handle, mode).await } }