fix: replace toggle with show for main window in lightweight mode exit #4697

This commit is contained in:
Tunglies
2025-09-09 21:25:38 +08:00
parent dfc1f736af
commit ccbffa14f0
2 changed files with 2 additions and 4 deletions

View File

@@ -535,7 +535,7 @@ impl Tray {
}),
"main_window" => Box::pin(async move {
if !lightweight::exit_lightweight_mode().await {
WindowManager::toggle_main_window().await;
WindowManager::show_main_window().await;
};
}),
_ => Box::pin(async move {}),
@@ -974,7 +974,7 @@ fn on_menu_event(_: &AppHandle, event: MenuEvent) {
return;
}
if !lightweight::exit_lightweight_mode().await {
WindowManager::toggle_main_window().await;
WindowManager::show_main_window().await;
};
}
"system_proxy" => {

View File

@@ -209,8 +209,6 @@ pub async fn exit_lightweight_mode() -> bool {
}
WindowManager::show_main_window().await;
WindowManager::toggle_main_window().await;
println!("what the fuck you want");
set_lightweight_mode(false).await;
let _ = cancel_light_weight_timer();