[Updater > Module] Minor source cleanup
This commit is contained in:
parent
f4c097e086
commit
e256e8fea1
1 changed files with 1 additions and 11 deletions
|
@ -73,14 +73,6 @@ exports.init = (endpoint, { releaseChannel, version }) => {
|
||||||
})() : autoUpdater;
|
})() : autoUpdater;
|
||||||
|
|
||||||
|
|
||||||
hostUpdater.on('update-available', () => {
|
|
||||||
log('Modules', 'Host available');
|
|
||||||
|
|
||||||
events.emit('checked', {
|
|
||||||
count: 1
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
hostUpdater.on('update-progress', progress => events.emit('downloading-module', { name: 'host', progress }));
|
hostUpdater.on('update-progress', progress => events.emit('downloading-module', { name: 'host', progress }));
|
||||||
|
|
||||||
hostUpdater.on('update-not-available', hostPassed);
|
hostUpdater.on('update-not-available', hostPassed);
|
||||||
|
@ -139,21 +131,19 @@ const checkModules = async () => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let doing = 0;
|
|
||||||
for (const name in installed) {
|
for (const name in installed) {
|
||||||
const inst = installed[name].installedVersion;
|
const inst = installed[name].installedVersion;
|
||||||
const rem = remote[name];
|
const rem = remote[name];
|
||||||
|
|
||||||
if (inst !== rem) {
|
if (inst !== rem) {
|
||||||
log('Modules', 'Update:', name, inst, '->', rem);
|
log('Modules', 'Update:', name, inst, '->', rem);
|
||||||
doing++;
|
|
||||||
|
|
||||||
downloadModule(name, rem);
|
downloadModule(name, rem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
events.emit('checked', {
|
events.emit('checked', {
|
||||||
count: doing
|
count: downloading.total
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue