From b7ed626667f433475b192b5bb0347f47403c4443 Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Tue, 3 Sep 2024 19:16:04 -0700 Subject: [PATCH] fix settings check in updater code --- emain/updater.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/emain/updater.ts b/emain/updater.ts index bf65e7e26..e75f98550 100644 --- a/emain/updater.ts +++ b/emain/updater.ts @@ -18,16 +18,16 @@ export class Updater { private _status: UpdaterStatus; lastUpdateCheck: Date; - constructor(options: AutoUpdateOpts) { - this.intervalms = options.intervalms; - this.autoCheckEnabled = options.enabled; + constructor(settings: SettingsType) { + this.intervalms = settings["autoupdate:intervalms"]; + this.autoCheckEnabled = settings["autoupdate:enabled"]; this._status = "up-to-date"; this.lastUpdateCheck = new Date(0); this.autoCheckInterval = null; this.availableUpdateReleaseName = null; - autoUpdater.autoInstallOnAppQuit = options.installonquit; + autoUpdater.autoInstallOnAppQuit = settings["autoupdate:installonquit"]; autoUpdater.removeAllListeners(); @@ -195,8 +195,8 @@ export async function configureAutoUpdater() { try { console.log("Configuring updater"); - const autoUpdateOpts = (await services.FileService.GetSettingsConfig()).autoupdate; - updater = new Updater(autoUpdateOpts); + const settings = (await services.FileService.GetFullConfig()).settings; + updater = new Updater(settings); await updater.start(); } catch (e) { console.warn("error configuring updater", e.toString());