improve check_software_update
This commit is contained in:
parent
8d231b4605
commit
c06ac9341a
2 changed files with 8 additions and 5 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue