diff options
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js index 95115b4..265e13d 100644 --- a/src/index.js +++ b/src/index.js @@ -53,11 +53,23 @@ function start() { ipcMain.on("installedmod", (event, modname) => {win.webContents.send("installedmod", modname)}); ipcMain.on("guigetmods", (event, ...args) => {win.webContents.send("mods", utils.mods.list())}); + ipcMain.on("savesettings", (event, obj) => {utils.saveSettings(obj)}) + + ipcMain.on("can-autoupdate", (event) => { + if (! require("electron-updater").autoUpdater.isUpdaterActive()) { + win.webContents.send("cant-autoupdate") + } + }) + win.webContents.on("dom-ready", () => { win.webContents.send("mods", utils.mods.list()); }); - if (utils.settings.autoupdate) {utils.updatevp(false)} + if (utils.settings.autoupdate) { + utils.updatevp(false) + } else { + utils.handleNorthstarUpdating(); + } autoUpdater.on("update-downloaded", () => { win.webContents.send("updateavailable") |