From cca87496618e32e719cca38161ea084c46ee6cc0 Mon Sep 17 00:00:00 2001 From: Alberto Iannaccone Date: Fri, 23 Sep 2022 16:30:54 +0200 Subject: [PATCH] Initialise the IDE updater even when 'checkForUpdates' preference is false --- .../browser/contributions/check-for-ide-updates.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arduino-ide-extension/src/browser/contributions/check-for-ide-updates.ts b/arduino-ide-extension/src/browser/contributions/check-for-ide-updates.ts index 14ba623bf..ab5f62ac2 100644 --- a/arduino-ide-extension/src/browser/contributions/check-for-ide-updates.ts +++ b/arduino-ide-extension/src/browser/contributions/check-for-ide-updates.ts @@ -37,16 +37,17 @@ export class CheckForIDEUpdates extends Contribution { } override onReady(): void { - const checkForUpdates = this.preferences['arduino.checkForUpdates']; - if (!checkForUpdates) { - return; - } this.updater .init( this.preferences.get('arduino.ide.updateChannel'), this.preferences.get('arduino.ide.updateBaseUrl') ) - .then(() => this.updater.checkForUpdates(true)) + .then(() => { + if (!this.preferences['arduino.checkForUpdates']) { + return; + } + return this.updater.checkForUpdates(true); + }) .then(async (updateInfo) => { if (!updateInfo) return; const versionToSkip = await this.localStorage.getData(