fix: silent start does not take effect (#3708)

* fix: light mode error

* feat: optimize the logic

* fix: clippy issues
This commit is contained in:
希亚的西红柿
2025-06-12 23:39:03 +08:00
committed by GitHub
parent cc39b2734e
commit 4e54b61380
3 changed files with 19 additions and 6 deletions

View File

@@ -54,12 +54,12 @@ pub fn auto_lightweight_mode_init() {
let _ = app_handle.state::<Mutex<LightWeightState>>();
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 {
if enable_auto && !is_silent_start {
logging!(
info,
Type::Lightweight,
true,
"Add timer listener when creating window in silent start mode"
"Add timer listener when creating window normally"
);
set_lightweight_mode(true);
enable_auto_light_weight_mode();