parent
3eb9b8e84b
commit
532af4a680
1 changed files with 7 additions and 3 deletions
|
|
@ -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();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue