Add auto login only on production build.
This commit is contained in:
@@ -130,10 +130,12 @@ function createWindow(): void {
|
||||
const currentSetting = store.get("app.openOnStartup") as boolean;
|
||||
store.set("app.openOnStartup", !currentSetting);
|
||||
log.info("Open on startup set to", !currentSetting);
|
||||
app.setLoginItemSettings({
|
||||
enabled: true, //This is a windows only command. Updates the task manager and registry.
|
||||
openAtLogin: !currentSetting,
|
||||
});
|
||||
if (!import.meta.env.DEV) {
|
||||
app.setLoginItemSettings({
|
||||
enabled: true, //This is a windows only command. Updates the task manager and registry.
|
||||
openAtLogin: !currentSetting,
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -380,10 +382,12 @@ app.on("before-quit", () => {
|
||||
const currentSetting = store.get("app.openOnStartup") as boolean;
|
||||
store.set("app.openOnStartup", !currentSetting);
|
||||
log.info("Open on startup set to", !currentSetting);
|
||||
app.setLoginItemSettings({
|
||||
enabled: true, //This is a windows only command. Updates the task manager and registry.
|
||||
openAtLogin: !currentSetting,
|
||||
});
|
||||
if (!import.meta.env.DEV) {
|
||||
app.setLoginItemSettings({
|
||||
enabled: true, //This is a windows only command. Updates the task manager and registry.
|
||||
openAtLogin: !currentSetting,
|
||||
});
|
||||
}
|
||||
|
||||
isAppQuitting = true;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user