From ea1ebe7251566b866f0fce4bcdf8039c09479e15 Mon Sep 17 00:00:00 2001 From: Oj Date: Mon, 4 Apr 2022 08:55:48 +0100 Subject: [PATCH] [Updater > Module] Minor source cleanup further --- src/updater/moduleUpdater.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/updater/moduleUpdater.js b/src/updater/moduleUpdater.js index 125896f..58ebd7f 100644 --- a/src/updater/moduleUpdater.js +++ b/src/updater/moduleUpdater.js @@ -62,8 +62,6 @@ exports.init = (endpoint, _settings, { releaseChannel, version }) => { hostUpdater = require('./hostUpdater'); - hostUpdater.on('checking-for-update', () => events.emit('checking-for-updates')); - hostUpdater.on('update-available', () => { log('Modules', 'Host available'); @@ -365,14 +363,10 @@ exports.checkForUpdates = () => { if (checking) return; checking = true; - const skipThis = lastUpdate > Date.now() - 10000; + events.emit('checking-for-updates'); - if (skipHost || skipThis) { - events.emit('checking-for-updates'); - hostPassed(skipModule || skipThis); - } else { - hostUpdater.checkForUpdates(); - } + if (skipHost || lastUpdate > Date.now() - 10000) hostPassed(true); + else hostUpdater.checkForUpdates(); }; exports.quitAndInstallUpdates = () => {