@@ -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();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user