mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-28 00:10:05 +08:00
refactor(updater): own the updater state in a single actor
This commit is contained in:
@@ -163,8 +163,10 @@ pub(super) async fn apply(config_write: &MutexGuard<'_, ()>, patch: Patch<'_>, e
|
||||
transaction.commit();
|
||||
match patch {
|
||||
Patch::Verge { patch, .. } => {
|
||||
if patch.auto_check_update == Some(false) {
|
||||
SilentUpdater::global().discard_pending().await;
|
||||
if patch.auto_check_update == Some(false)
|
||||
&& let Some(updater) = SilentUpdater::global()
|
||||
{
|
||||
updater.discard_pending().await;
|
||||
}
|
||||
if effects.contains(&Effect::ClashConfig) {
|
||||
announce(Refresh::Clash);
|
||||
|
||||
Reference in New Issue
Block a user