refactor: remove unnecessary emit calls in switch_proxy_node and enhance profile switch notifications

This commit is contained in:
Tunglies
2025-11-06 00:30:43 +08:00
parent 6eaf999240
commit 21de5cbb0b
2 changed files with 75 additions and 47 deletions

View File

@@ -60,7 +60,6 @@ pub async fn switch_proxy_node(group_name: &str, proxy_name: &str) {
group_name,
proxy_name
);
let _ = handle::Handle::app_handle().emit("verge://force-refresh-proxies", ());
let _ = tray::Tray::global().update_menu().await;
}
Err(err) => {
@@ -72,7 +71,6 @@ pub async fn switch_proxy_node(group_name: &str, proxy_name: &str) {
proxy_name,
err
);
let _ = handle::Handle::app_handle().emit("verge://force-refresh-proxies", ());
}
}
}