mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-02-17 22:11:30 +08:00
improve check_software_update
This commit is contained in:
@@ -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")]
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user