mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 17:15:38 +08:00
refactor: streamline macOS-specific code by consolidating conditional imports and logic in sysopt, tray, lightweight, and mihomo modules
This commit is contained in:
@@ -3,9 +3,11 @@ use crate::{
|
||||
core::{handle, timer::Timer},
|
||||
log_err, logging, logging_error,
|
||||
utils::logging::Type,
|
||||
AppHandleManager,
|
||||
};
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
use crate::AppHandleManager;
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
use delay_timer::prelude::TaskBuilder;
|
||||
use once_cell::sync::OnceCell;
|
||||
@@ -112,6 +114,7 @@ pub fn exit_lightweight_mode() {
|
||||
exit_lock.0 = false;
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
pub fn add_light_weight_timer() {
|
||||
logging_error!(Type::Lightweight, setup_light_weight_timer());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user