From 8c2262dd953480b66c77fb60ceea32ff468e4dd5 Mon Sep 17 00:00:00 2001 From: Thomas <61302103+THR-hub@users.noreply.github.com> Date: Wed, 17 Sep 2025 12:45:35 +0800 Subject: [PATCH] stop showing hidden groups in the tray menu (#4765) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 托盘菜单不显示隐藏代理组 --- src-tauri/src/core/tray/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/core/tray/mod.rs b/src-tauri/src/core/tray/mod.rs index 29ee1b3c..7317fbf8 100644 --- a/src-tauri/src/core/tray/mod.rs +++ b/src-tauri/src/core/tray/mod.rs @@ -635,7 +635,9 @@ async fn create_tray_menu( let should_show = match mode { "global" => group_name == "GLOBAL", _ => group_name != "GLOBAL", - }; + } && + // Check if the group is hidden + !group_data.get("hidden").and_then(|v| v.as_bool( )).unwrap_or(false); if !should_show { continue;