Skip to content
Snippets Groups Projects
Unverified Commit 6bc83d9f authored by GyDi's avatar GyDi
Browse files

fix: mutex dead lock

parent 790d8321
No related branches found
No related tags found
No related merge requests found
......@@ -32,12 +32,14 @@ pub fn change_clash_mode(mode: String) {
mapping.insert(Value::from("mode"), mode.clone().into());
tauri::async_runtime::spawn(async move {
log::debug!(target: "app", "change clash mode to {mode}");
match clash_api::patch_configs(&mapping).await {
Ok(_) => {
// 更新配置
Config::clash().data().patch_config(mapping);
if let Ok(_) = Config::clash().data().save_config() {
if Config::clash().data().save_config().is_ok() {
handle::Handle::refresh_clash();
log_err!(handle::Handle::update_systray_part());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment