fix: use the correct argument for auto start (#22)

fixes #20
This commit is contained in:
Paul Makles
2025-12-29 17:59:49 +01:00
committed by GitHub
parent 3eb9b8e84b
commit 532af4a680
+7 -3
View File
@@ -14,6 +14,10 @@ ipcMain.on("isAutostart?", () =>
.then((enabled) => mainWindow.webContents.send("isAutostart", enabled)), .then((enabled) => mainWindow.webContents.send("isAutostart", enabled)),
); );
ipcMain.on("setAutostart", (state) => ipcMain.on("setAutostart", (_event, state: boolean) => {
state ? autoLaunch.enable() : autoLaunch.disable(), if (state) {
); autoLaunch.enable();
} else {
autoLaunch.disable();
}
});