async for resetScrollHeight, slightly faster WI/AF panel loads

This commit is contained in:
RossAscends
2024-08-05 12:03:46 +09:00
parent c13ca77bd9
commit 64e716bb62
7 changed files with 42 additions and 38 deletions

View File

@@ -6424,7 +6424,7 @@ export async function getSettings() {
loadHordeSettings(settings);
// Load power user settings
loadPowerUserSettings(settings, data);
await loadPowerUserSettings(settings, data);
// Load character tags
loadTagsSettings(settings);
@@ -10457,8 +10457,9 @@ jQuery(async function () {
}
// Set the height of "autoSetHeight" textareas within the drawer to their scroll height
$(this).closest('.drawer').find('.drawer-content textarea.autoSetHeight').each(function () {
resetScrollHeight($(this));
$(this).closest('.drawer').find('.drawer-content textarea.autoSetHeight').each(async function () {
await resetScrollHeight($(this));
return;
});
} else if (drawerWasOpenAlready) { //to close manually
@@ -10531,8 +10532,9 @@ jQuery(async function () {
$(this).closest('.inline-drawer').find('.inline-drawer-content').stop().slideToggle();
// Set the height of "autoSetHeight" textareas within the inline-drawer to their scroll height
$(this).closest('.inline-drawer').find('.inline-drawer-content textarea.autoSetHeight').each(function () {
resetScrollHeight($(this));
$(this).closest('.inline-drawer').find('.inline-drawer-content textarea.autoSetHeight').each(async function () {
await resetScrollHeight($(this));
return;
});
});