chore: update

This commit is contained in:
huzibaca 2024-09-23 17:15:28 +08:00
parent 52d5f2c992
commit 8a3a094414
No known key found for this signature in database
GPG Key ID: D4364EE4851DC302

View File

@ -53,16 +53,12 @@ impl Tray {
.. ..
} = event } = event
{ {
let _ = tray.set_visible(false);
let app = tray.app_handle();
match tray_event.as_str() { match tray_event.as_str() {
"system_proxy" => feat::toggle_system_proxy(), "system_proxy" => feat::toggle_system_proxy(),
"tun_mode" => feat::toggle_tun_mode(), "tun_mode" => feat::toggle_tun_mode(),
"main_window" => resolve::create_window(), "main_window" => resolve::create_window(),
_ => {} _ => {}
} }
let _ = tray.set_visible(true);
} }
}); });
tray.on_menu_event(on_menu_event); tray.on_menu_event(on_menu_event);