diff --git a/src/common.rs b/src/common.rs index 23f7b4b0f..83272a710 100644 --- a/src/common.rs +++ b/src/common.rs @@ -826,7 +826,13 @@ pub fn is_modifier(evt: &KeyEvent) -> bool { } pub fn check_software_update() { - std::thread::spawn(move || allow_err!(check_software_update_())); + if is_custom_client() { + return; + } + let opt = config::LocalConfig::get_option(config::keys::OPTION_ENABLE_CHECK_UPDATE); + if config::option2bool(config::keys::OPTION_ENABLE_CHECK_UPDATE, &opt) { + std::thread::spawn(move || allow_err!(check_software_update_())); + } } #[tokio::main(flavor = "current_thread")] diff --git a/src/flutter_ffi.rs b/src/flutter_ffi.rs index a8d51990b..2e66a11a2 100644 --- a/src/flutter_ffi.rs +++ b/src/flutter_ffi.rs @@ -1446,10 +1446,7 @@ pub fn main_get_last_remote_id() -> String { } pub fn main_get_software_update_url() { - let opt = get_local_option(config::keys::OPTION_ENABLE_CHECK_UPDATE.to_string()); - if config::option2bool(config::keys::OPTION_ENABLE_CHECK_UPDATE, &opt) { - crate::common::check_software_update(); - } + crate::common::check_software_update(); } pub fn main_get_home_dir() -> String {