Move extensions update check to after init

This commit is contained in:
Cohee
2023-10-27 21:23:58 +03:00
parent 4524f6dbfd
commit e0be4dde31
2 changed files with 9 additions and 4 deletions

View File

@ -144,7 +144,7 @@ import {
onlyUnique, onlyUnique,
} from "./scripts/utils.js"; } from "./scripts/utils.js";
import { ModuleWorkerWrapper, extension_settings, getContext, loadExtensionSettings, processExtensionHelpers, registerExtensionHelper, renderExtensionTemplate, runGenerationInterceptors, saveMetadataDebounced } from "./scripts/extensions.js"; import { ModuleWorkerWrapper, doDailyExtensionUpdatesCheck, extension_settings, getContext, loadExtensionSettings, processExtensionHelpers, registerExtensionHelper, renderExtensionTemplate, runGenerationInterceptors, saveMetadataDebounced } from "./scripts/extensions.js";
import { COMMENT_NAME_DEFAULT, executeSlashCommands, getSlashCommandsHelp, registerSlashCommand } from "./scripts/slash-commands.js"; import { COMMENT_NAME_DEFAULT, executeSlashCommands, getSlashCommandsHelp, registerSlashCommand } from "./scripts/slash-commands.js";
import { import {
tag_map, tag_map,
@ -728,6 +728,7 @@ async function firstLoadInit() {
initRossMods(); initRossMods();
initStats(); initStats();
initCfg(); initCfg();
doDailyExtensionUpdatesCheck();
} }
function checkOnlineStatus() { function checkOnlineStatus() {

View File

@ -774,10 +774,14 @@ async function loadExtensionSettings(settings, versionChanged) {
if (extension_settings.autoConnect && extension_settings.apiUrl) { if (extension_settings.autoConnect && extension_settings.apiUrl) {
connectToApi(extension_settings.apiUrl); connectToApi(extension_settings.apiUrl);
} }
}
if (extension_settings.notifyUpdates) { export function doDailyExtensionUpdatesCheck() {
checkForExtensionUpdates(false); setTimeout(() => {
} if (extension_settings.notifyUpdates) {
checkForExtensionUpdates(false);
}
}, 1);
} }
/** /**