mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-28 00:10:05 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user