Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

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)

Chloe Oletto0d8c855cd08b
diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.ts
index 82d6ba858..fc0232579 100644
--- a/apps/desktop/src/main.ts
+++ b/apps/desktop/src/main.ts
@@ -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, "/")}`);