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

@@ -263,6 +263,17 @@ pub fn create_window(is_show: bool) -> bool {
is_show
);
if !is_show {
logging!(
info,
Type::Window,
true,
"Not to create window when starting in silent mode"
);
handle::Handle::notify_startup_completed();
return false;
}
if let Some(app_handle) = handle::Handle::global().app_handle() {
if let Some(window) = app_handle.get_webview_window("main") {
logging!(info, Type::Window, true, "主窗口已存在,将显示现有窗口");