From 33fdcc38b51f3d9b6748be6788eaa885d8a98013 Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Sun, 21 Sep 2025 21:33:01 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E8=BF=98=E5=8E=9F=E8=BD=BB=E9=87=8F?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E7=9A=84=E8=BF=9B=E5=85=A5=E5=92=8C=E9=80=80?= =?UTF-8?q?=E5=87=BA=E8=A1=8C=E4=B8=BA=20(#4817)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 8f88270cdff1d6756962822e69974ec46b808820. --- src-tauri/src/core/tray/mod.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src-tauri/src/core/tray/mod.rs b/src-tauri/src/core/tray/mod.rs index 546a7268..68b24e64 100644 --- a/src-tauri/src/core/tray/mod.rs +++ b/src-tauri/src/core/tray/mod.rs @@ -875,7 +875,7 @@ async fn create_tray_menu( let lighteweight_mode = &CheckMenuItem::with_id( app_handle, - "lightweight_mode", + "entry_lightweight_mode", lightweight_mode_text, true, is_lightweight_mode, @@ -1029,15 +1029,11 @@ fn on_menu_event(_: &AppHandle, event: MenuEvent) { } "restart_clash" => feat::restart_clash_core().await, // Await async function "restart_app" => feat::restart_app().await, // Await async function - "lightweight_mode" => { + "entry_lightweight_mode" => { if !should_handle_tray_click() { return; } - if !is_in_lightweight_mode() { - lightweight::entry_lightweight_mode().await; // Await async function - } else { - lightweight::exit_lightweight_mode().await; // Await async function - } + lightweight::entry_lightweight_mode().await; // Await async function } "quit" => { feat::quit().await; // Await async function