chore: sync lock safety with backend cleanup

This commit is contained in:
Tunglies
2026-11-02 18:56:24 +08:00
32 changed files with 1288 additions and 526 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ async fn finalize_restored_verge_config(
}
}
// `patch_verge` re-acquires the lock through `try_lock_config_write`.
// `patch_verge` re-acquires the configuration write lock.
drop(config_write);
// Run configuration side effects without rewriting the already-restored file.
+1 -1
View File
@@ -27,7 +27,7 @@ pub async fn patch_verge(patch: &IVerge, not_save_file: bool) -> Result<()> {
/// Apply a patch without post-update reconciliation.
pub(super) async fn apply_verge_patch(patch: &IVerge, not_save_file: bool) -> Result<()> {
let config_write = Config::try_lock_config_write()?;
let config_write = Config::lock_config_write().await;
apply_verge_patch_locked(&config_write, patch, not_save_file).await
}
-1
View File
@@ -321,7 +321,6 @@ pub async fn hide() {
{
let _ = window.hide();
}
handle::Handle::global().set_activation_policy_accessory();
}
#[cfg(test)]