fix: use the correct argument for auto start

fixes #20
This commit is contained in:
izzy 2025-12-29 16:46:10 +00:00
parent 6907a33dc7
commit b2faf5e131
No known key found for this signature in database
1 changed files with 7 additions and 3 deletions

View File

@ -14,6 +14,10 @@ ipcMain.on("isAutostart?", () =>
.then((enabled) => mainWindow.webContents.send("isAutostart", enabled)),
);
ipcMain.on("setAutostart", (state) =>
state ? autoLaunch.enable() : autoLaunch.disable(),
);
ipcMain.on("setAutostart", (_event, state: boolean) => {
if (state) {
autoLaunch.enable();
} else {
autoLaunch.disable();
}
});