diff --git a/src-tauri/src/core/tray/mod.rs b/src-tauri/src/core/tray/mod.rs index ead412bb1..75b02c2f3 100644 --- a/src-tauri/src/core/tray/mod.rs +++ b/src-tauri/src/core/tray/mod.rs @@ -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" => { diff --git a/src-tauri/src/module/lightweight.rs b/src-tauri/src/module/lightweight.rs index f03337a98..55da5c13e 100644 --- a/src-tauri/src/module/lightweight.rs +++ b/src-tauri/src/module/lightweight.rs @@ -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();