mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-04 06:02:08 +08:00
chore: merge dev into backend cleanup
This commit is contained in:
@@ -106,14 +106,14 @@ impl AutoBackupManager {
|
||||
|
||||
pub async fn init(&self) -> Result<()> {
|
||||
let settings = Self::load_settings().await;
|
||||
let _ = self.settings_tx.send(settings);
|
||||
let _ = self.settings_tx.send_replace(settings);
|
||||
self.maybe_start_runner(settings);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn refresh_settings(&self) -> Result<()> {
|
||||
let settings = Self::load_settings().await;
|
||||
let _ = self.settings_tx.send(settings);
|
||||
let _ = self.settings_tx.send_replace(settings);
|
||||
self.maybe_start_runner(settings);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -321,7 +321,6 @@ pub async fn hide() {
|
||||
{
|
||||
let _ = window.hide();
|
||||
}
|
||||
handle::Handle::global().set_activation_policy_accessory();
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -289,9 +289,6 @@ pub fn run() -> std::process::ExitCode {
|
||||
}
|
||||
|
||||
pub fn handle_window_close(api: &tauri::WindowEvent) {
|
||||
#[cfg(target_os = "macos")]
|
||||
handle::Handle::global().set_activation_policy_accessory();
|
||||
|
||||
if core::handle::Handle::global().is_exiting() {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user