[Updater > Module] Minor source cleanup further
This commit is contained in:
parent
cc02435a0b
commit
ea1ebe7251
1 changed files with 3 additions and 9 deletions
|
@ -62,8 +62,6 @@ exports.init = (endpoint, _settings, { releaseChannel, version }) => {
|
||||||
|
|
||||||
hostUpdater = require('./hostUpdater');
|
hostUpdater = require('./hostUpdater');
|
||||||
|
|
||||||
hostUpdater.on('checking-for-update', () => events.emit('checking-for-updates'));
|
|
||||||
|
|
||||||
hostUpdater.on('update-available', () => {
|
hostUpdater.on('update-available', () => {
|
||||||
log('Modules', 'Host available');
|
log('Modules', 'Host available');
|
||||||
|
|
||||||
|
@ -365,14 +363,10 @@ exports.checkForUpdates = () => {
|
||||||
if (checking) return;
|
if (checking) return;
|
||||||
checking = true;
|
checking = true;
|
||||||
|
|
||||||
const skipThis = lastUpdate > Date.now() - 10000;
|
events.emit('checking-for-updates');
|
||||||
|
|
||||||
if (skipHost || skipThis) {
|
if (skipHost || lastUpdate > Date.now() - 10000) hostPassed(true);
|
||||||
events.emit('checking-for-updates');
|
else hostUpdater.checkForUpdates();
|
||||||
hostPassed(skipModule || skipThis);
|
|
||||||
} else {
|
|
||||||
hostUpdater.checkForUpdates();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.quitAndInstallUpdates = () => {
|
exports.quitAndInstallUpdates = () => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue