fix(updater): clear cache when auto-check is disabled (#8091)

Assisted-by: wonfen
This commit is contained in:
❤是纱雾酱哟~
2026-10-07 13:16:34 +08:00
committed by GitHub
parent af808a677c
commit 78691ea5c8
3 changed files with 46 additions and 2 deletions
+4 -1
View File
@@ -1,6 +1,6 @@
use crate::{
config::{Config, IVerge},
core::{CoreManager, autostart, handle, hotkey, logger, proxy_control, tray},
core::{CoreManager, SilentUpdater, autostart, handle, hotkey, logger, proxy_control, tray},
module::{auto_backup::AutoBackupManager, lightweight},
};
use anyhow::Result;
@@ -310,6 +310,9 @@ pub(super) async fn apply_verge_patch_locked(
// A failed patch rolls back to what the user already had; it never invents a value for them.
process_terminated_flags(update_flags, patch).await?;
transaction.commit();
if patch.auto_check_update == Some(false) {
SilentUpdater::global().discard_pending();
}
announce_verge_change();
logging_error!(Type::Backup, AutoBackupManager::global().refresh_settings().await);