Update On Fri May 9 20:36:54 CEST 2025

This commit is contained in:
github-action[bot]
2025-05-09 20:36:54 +02:00
parent 40a1860078
commit 5ad5eb65a0
268 changed files with 32572 additions and 1774 deletions

View File

@@ -16,8 +16,6 @@ use std::{
};
use tauri::{Listener, Manager};
pub static AUTO_LIGHT_WEIGHT_MODE_INIT: OnceCell<()> = OnceCell::new();
const LIGHT_WEIGHT_TASK_UID: &str = "light_weight_task";
// 轻量模式状态标志
@@ -217,19 +215,3 @@ fn cancel_light_weight_timer() -> Result<()> {
Ok(())
}
pub fn run_once_auto_lightweight() {
AUTO_LIGHT_WEIGHT_MODE_INIT.get_or_init(|| {
let is_silent_start = { Config::verge().data().enable_silent_start }.unwrap_or(false);
let enable_auto = { Config::verge().data().enable_auto_light_weight_mode }.unwrap_or(false);
if enable_auto && is_silent_start {
logging!(
info,
Type::Lightweight,
true,
"Add timer listener when creating window in silent start mode"
);
enable_auto_light_weight_mode();
}
});
}