desktop: If --hidden passed via cli and any system tray option enabled, don't show the window. streetwriters/notesnook#9902 flathub/com.Notesnook.notesnook#99 (#9942)

Signed-off-by: Chloe Oletto <NeedsChloesure@riseup.net>
This commit is contained in:
Chloe Oletto
2026-07-23 21:16:17 -07:00
committed by GitHub
parent d63ce5a213
commit 0d8c855cd0

View File

@@ -141,7 +141,8 @@ async function createWindow() {
mainWindow.setMenuBarVisibility(false);
mainWindowState.manage(mainWindow);
if (cliOptions.hidden && !config.desktopSettings.minimizeToSystemTray)
if (cliOptions.hidden && !(config.desktopSettings.minimizeToSystemTray
|| config.desktopSettings.closeToSystemTray))
mainWindow.minimize();
await mainWindow.webContents.loadURL(`${createURL(cliOptions, "/")}`);