feat: initial commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import AutoLaunch from "auto-launch";
|
||||
|
||||
import { ipcMain } from "electron";
|
||||
|
||||
import { mainWindow } from "./window";
|
||||
|
||||
export const autoLaunch = new AutoLaunch({
|
||||
name: "Revolt",
|
||||
});
|
||||
|
||||
ipcMain.on("isAutostart?", () =>
|
||||
autoLaunch
|
||||
.isEnabled()
|
||||
.then((enabled) => mainWindow.webContents.send("isAutostart", enabled)),
|
||||
);
|
||||
|
||||
ipcMain.on("setAutostart", (state) =>
|
||||
state ? autoLaunch.enable() : autoLaunch.disable(),
|
||||
);
|
||||
Reference in New Issue
Block a user