refactor(updater): retire the startup install UI (#8747)

* refactor(updater): retire the startup install UI

* fix(updater): keep daily checks running and harden the cache path
This commit is contained in:
Tunglies
2026-11-27 07:17:15 +00:00
committed by GitHub
parent 385022bd13
commit 876d287152
17 changed files with 99 additions and 368 deletions
+3 -9
View File
@@ -80,6 +80,8 @@ async fn resolve_setup() {
init_core_manager().await;
});
init_silent_updater();
let _ = futures::join!(
core_init,
init_tray(),
@@ -87,7 +89,6 @@ async fn resolve_setup() {
init_hotkey(),
init_auto_lightweight_boot(),
init_auto_backup(),
init_silent_updater(),
);
Handle::refresh_clash();
@@ -152,20 +153,13 @@ async fn init_auto_backup() {
logging_error!(Type::Setup, AutoBackupManager::global().init().await);
}
async fn init_silent_updater() {
fn init_silent_updater() {
use crate::core::SilentUpdater;
use crate::core::handle::Handle;
logging!(debug, Type::Setup, "Initializing silent updater...");
let app_handle = Handle::app_handle();
// Install cached updates before starting background checks.
if SilentUpdater::global().try_install_on_startup(app_handle).await {
logging!(info, Type::Setup, "Update installed at startup, restarting...");
feat::restart_app().await;
}
let app_handle = app_handle.clone();
tokio::spawn(async move {
SilentUpdater::global().start_background_check(app_handle).await;