Await settings load

This commit is contained in:
Cohee 2024-09-01 18:01:21 +03:00
parent 2b2a29554d
commit 94ef9e8908
4 changed files with 5 additions and 5 deletions

View File

@ -1613,7 +1613,7 @@ async function loadPowerUserSettings(settings, data) {
switchReducedMotion();
switchCompactInputArea();
reloadMarkdownProcessor(power_user.render_formulas);
loadInstructMode(data);
await loadInstructMode(data);
await loadContextSettings();
loadMaxContextUnlocked();
switchWaifuMode();
@ -1767,7 +1767,7 @@ async function loadContextSettings() {
// If the setting already exists, no need to duplicate it
// TODO: Maybe check the power_user object for the setting instead of a flag?
$element.on('input keyUp', async function () {
$element.on('input keyup', async function () {
const value = control.isCheckbox ? !!$(this).prop('checked') : $(this)[0].innerText;
if (control.isGlobalSetting) {
power_user[control.property] = value;