From 4ab2720ac42244d9c0388d1ccdb821f3a6666685 Mon Sep 17 00:00:00 2001 From: Slinetrac Date: Thu, 25 Dec 2025 10:42:03 +0800 Subject: [PATCH] refactor(tray): remove --no-tray code path and env-based tray bypass --- src-tauri/src/main.rs | 7 ------- src-tauri/src/utils/resolve/mod.rs | 3 --- 2 files changed, 10 deletions(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 1066ad119..fa3c6905e 100755 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -3,12 +3,5 @@ fn main() { #[cfg(feature = "tokio-trace")] console_subscriber::init(); - // Check for --no-tray command line argument - #[cfg(target_os = "linux")] - if std::env::args().any(|x| x == "--no-tray") { - unsafe { - std::env::set_var("CLASH_VERGE_DISABLE_TRAY", "1"); - } - } app_lib::run(); } diff --git a/src-tauri/src/utils/resolve/mod.rs b/src-tauri/src/utils/resolve/mod.rs index 042d5d56e..7da555257 100644 --- a/src-tauri/src/utils/resolve/mod.rs +++ b/src-tauri/src/utils/resolve/mod.rs @@ -154,9 +154,6 @@ pub async fn init_work_config() { } pub(super) async fn init_tray() { - if std::env::var("CLASH_VERGE_DISABLE_TRAY").unwrap_or_default() == "1" { - return; - } logging_error!(Type::Setup, Tray::global().init().await); }