mirror of
https://github.com/bolucat/Archive.git
synced 2025-10-05 08:08:03 +08:00
Update On Fri May 9 20:36:54 CEST 2025
This commit is contained in:
@@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user