Fix and Optimize

fix: #3187 and #3096, silent startup can not trigger lightweight mode
fix: optimize startup initializing processing
This commit is contained in:
Tunglies
2025-04-05 10:24:53 +08:00
parent 55f1766ebc
commit 0de304d4e3
8 changed files with 30 additions and 56 deletions

View File

@@ -205,7 +205,7 @@ impl Tray {
match tray_event.as_str() {
"system_proxy" => feat::toggle_system_proxy(),
"tun_mode" => feat::toggle_tun_mode(None),
"main_window" => resolve::create_window(),
"main_window" => resolve::create_window(true),
_ => {}
}
}
@@ -680,7 +680,7 @@ fn on_menu_event(_: &AppHandle, event: MenuEvent) {
println!("change mode to: {}", mode);
feat::change_clash_mode(mode.into());
}
"open_window" => resolve::create_window(),
"open_window" => resolve::create_window(true),
"system_proxy" => feat::toggle_system_proxy(),
"tun_mode" => feat::toggle_tun_mode(None),
"copy_env" => feat::copy_clash_env(),