refactor: improve code formatting and enhance logging consistency across core and event handling modules

This commit is contained in:
xmk23333
2025-10-20 16:47:26 +08:00
parent b9dd62e2e6
commit 98778fe6a3
3 changed files with 129 additions and 67 deletions

View File

@@ -36,7 +36,12 @@ pub fn resolve_setup_async() {
let _ = AsyncHandler::spawn(|| async {
#[cfg(not(feature = "tauri-dev"))]
resolve_setup_logger().await;
logging!(info, Type::ClashVergeRev, "Version: {}", env!("CARGO_PKG_VERSION"));
logging!(
info,
Type::ClashVergeRev,
"Version: {}",
env!("CARGO_PKG_VERSION")
);
futures::join!(init_work_config(), init_resources(), init_startup_script());
@@ -156,7 +161,10 @@ pub(super) async fn init_core_manager() {
}
pub(super) async fn init_system_proxy() {
logging_error!(Type::Setup, sysopt::Sysopt::global().update_sysproxy().await);
logging_error!(
Type::Setup,
sysopt::Sysopt::global().update_sysproxy().await
);
}
pub(super) fn init_system_proxy_guard() {
@@ -168,7 +176,11 @@ pub(super) async fn refresh_tray_menu() {
}
pub(super) async fn init_window() {
let is_silent_start = Config::verge().await.latest_ref().enable_silent_start.unwrap_or(false);
let is_silent_start = Config::verge()
.await
.latest_ref()
.enable_silent_start
.unwrap_or(false);
#[cfg(target_os = "macos")]
if is_silent_start {
use crate::core::handle::Handle;