fix(lightweight): fix auto lightweight mode on exit when silent startup #6368

This commit is contained in:
Tunglies 2026-02-25 16:23:54 +08:00
parent ff48eacad2
commit 49fd3b04dc
No known key found for this signature in database
GPG Key ID: B9B01B389469B3E8

View File

@ -131,6 +131,15 @@ pub async fn exit_lightweight_mode() -> bool {
}
record_state_and_log(LightweightState::Exiting);
WindowManager::show_main_window().await;
let enable_auto_light_weight_mode = Config::verge()
.await
.data_arc()
.enable_auto_light_weight_mode
.unwrap_or(false);
if enable_auto_light_weight_mode {
setup_window_close_listener();
setup_webview_focus_listener();
}
let _ = cancel_light_weight_timer();
record_state_and_log(LightweightState::Normal);
refresh_lightweight_tray_state().await;