Add 'Auto Check Update' config to control whether to check for updates on start

This commit is contained in:
tk103331
2023-01-04 13:10:46 +08:00
parent c19698bc41
commit a7cd73b314
6 changed files with 38 additions and 13 deletions

View File

@@ -194,15 +194,7 @@ pub fn menu_handler(event: WindowMenuEvent<tauri::Wry>) {
);
}
"check_update" => {
tauri::async_runtime::spawn(async move {
let result = app.updater().check().await;
let update_resp = result.unwrap();
if update_resp.is_update_available() {
tauri::async_runtime::spawn(async move {
utils::prompt_for_install(app, update_resp).await.unwrap();
});
}
});
utils::run_check_update(app).unwrap();
}
// Preferences
"control_center" => window::control_window(&app),