mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
refactor(tray): remove --no-tray code path and env-based tray bypass
This commit is contained in:
@@ -3,12 +3,5 @@ fn main() {
|
|||||||
#[cfg(feature = "tokio-trace")]
|
#[cfg(feature = "tokio-trace")]
|
||||||
console_subscriber::init();
|
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();
|
app_lib::run();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,9 +154,6 @@ pub async fn init_work_config() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(super) async fn init_tray() {
|
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);
|
logging_error!(Type::Setup, Tray::global().init().await);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user