[Splash > Backend] Clean up source, remove ssuc option

main
Oj 2 years ago
parent 398b0720dc
commit 399ab4f861

@ -192,19 +192,6 @@ async function updateUntilCurrent() {
} }
} }
const oldCheckForUpdates = () => {
if (oaConfig.skipStartupUpdateChecks !== true) {
moduleUpdater.checkForUpdates();
} else {
log('Splash', 'Skipping startup update checking (enabled)');
modulesListeners[UPDATE_CHECK_FINISHED]({
succeeded: true,
updateCount: 0
});
}
};
function initOldUpdater() { function initOldUpdater() {
modulesListeners = {}; modulesListeners = {};
addModulesListener(CHECKING_FOR_UPDATES, () => { addModulesListener(CHECKING_FOR_UPDATES, () => {
@ -213,8 +200,7 @@ function initOldUpdater() {
}); });
addModulesListener(UPDATE_CHECK_FINISHED, ({ addModulesListener(UPDATE_CHECK_FINISHED, ({
succeeded, succeeded,
updateCount, updateCount
manualRequired
}) => { }) => {
stopUpdateTimeout(); stopUpdateTimeout();
@ -228,7 +214,6 @@ function initOldUpdater() {
} }
}); });
addModulesListener(DOWNLOADING_MODULE, ({ addModulesListener(DOWNLOADING_MODULE, ({
name,
current, current,
total total
}) => { }) => {
@ -240,17 +225,13 @@ function initOldUpdater() {
updateSplashState(DOWNLOADING_UPDATES); updateSplashState(DOWNLOADING_UPDATES);
}); });
addModulesListener(DOWNLOADING_MODULE_PROGRESS, ({ addModulesListener(DOWNLOADING_MODULE_PROGRESS, ({
name,
progress progress
}) => { }) => {
splashState.progress = progress; splashState.progress = progress;
updateSplashState(DOWNLOADING_UPDATES); updateSplashState(DOWNLOADING_UPDATES);
}); });
addModulesListener(DOWNLOADED_MODULE, ({ addModulesListener(DOWNLOADED_MODULE, ({
name, name
current,
total,
succeeded
}) => { }) => {
delete splashState.progress; delete splashState.progress;
@ -259,7 +240,6 @@ function initOldUpdater() {
} }
}); });
addModulesListener(DOWNLOADING_MODULES_FINISHED, ({ addModulesListener(DOWNLOADING_MODULES_FINISHED, ({
succeeded,
failed failed
}) => { }) => {
if (failed > 0) { if (failed > 0) {
@ -275,9 +255,8 @@ function initOldUpdater() {
}); });
} }
}); });
addModulesListener(NO_PENDING_UPDATES, () => oldCheckForUpdates()); addModulesListener(NO_PENDING_UPDATES, () => moduleUpdater.checkForUpdates());
addModulesListener(INSTALLING_MODULE, ({ addModulesListener(INSTALLING_MODULE, ({
name,
current, current,
total total
}) => { }) => {
@ -288,22 +267,14 @@ function initOldUpdater() {
updateSplashState(INSTALLING_UPDATES); updateSplashState(INSTALLING_UPDATES);
}); });
addModulesListener(INSTALLED_MODULE, ({ addModulesListener(INSTALLED_MODULE, ({
name,
current,
total,
succeeded
}) => delete splashState.progress); }) => delete splashState.progress);
addModulesListener(INSTALLING_MODULE_PROGRESS, ({ addModulesListener(INSTALLING_MODULE_PROGRESS, ({
name,
progress progress
}) => { }) => {
splashState.progress = progress; splashState.progress = progress;
updateSplashState(INSTALLING_UPDATES); updateSplashState(INSTALLING_UPDATES);
}); });
addModulesListener(INSTALLING_MODULES_FINISHED, ({ addModulesListener(INSTALLING_MODULES_FINISHED, () => moduleUpdater.checkForUpdates());
succeeded,
failed
}) => oldCheckForUpdates());
addModulesListener(UPDATE_MANUALLY, ({ addModulesListener(UPDATE_MANUALLY, ({
newVersion newVersion
}) => { }) => {

Loading…
Cancel
Save