Update logging macros usage in timer module

Replace log macros with custom logging macros in timer module
This commit is contained in:
Tunglies
2025-04-05 11:34:51 +08:00
parent 0de304d4e3
commit 0b8d08d13b
6 changed files with 76 additions and 78 deletions

View File

@@ -13,7 +13,7 @@ use crate::{
const LIGHT_WEIGHT_TASK_UID: &str = "light_weight_task";
pub fn enable_auto_light_weight_mode() {
let _ = Timer::global().init().unwrap();
Timer::global().init().unwrap();
logging!(info, Type::Lightweight, true, "开启自动轻量模式");
setup_window_close_listener();
setup_webview_focus_listener();

View File

@@ -39,10 +39,7 @@ impl PlatformSpecification {
// 使用默认值避免在同步上下文中执行异步操作
let running_mode = "NotRunning".to_string();
let is_admin = match system::is_admin() {
Ok(value) => value,
Err(_) => false,
};
let is_admin = system::is_admin().unwrap_or_default();
Self {
system_name,