A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
desktop: only set openAtLogin if not already set
Abdullah Atta8383c9329214
diff --git a/apps/desktop/src/utils/autolaunch.ts b/apps/desktop/src/utils/autolaunch.tsindex e68ab5d22..0918ba3ff 100644--- a/apps/desktop/src/utils/autolaunch.ts+++ b/apps/desktop/src/utils/autolaunch.ts@@ -35,6 +35,8 @@ const LINUX_AUTOSTART_DIRECTORY_PATH = path.join("autostart");+const STARTUP_ARGS = ["--hidden"];+export class AutoLaunch {static enable(hidden: boolean) {if (process.platform === "linux") {@@ -47,10 +49,14 @@ export class AutoLaunch {LINUX_DESKTOP_ENTRY(hidden));} else {+ const loginItemSettings = app.getLoginItemSettings({+ args: STARTUP_ARGS+ });+ if (loginItemSettings.openAtLogin) return;app.setLoginItemSettings({openAtLogin: true,openAsHidden: hidden,- args: ["--hidden"]+ args: STARTUP_ARGS});}}