diff --git a/public/script.js b/public/script.js index 2ab1f0e15..45a0dfd2d 100644 --- a/public/script.js +++ b/public/script.js @@ -1822,7 +1822,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject, if (type === 'swipe') { coreChat.pop(); } - + await runGenerationInterceptors(coreChat); console.log(`Core/all messages: ${coreChat.length}/${chat.length}`); @@ -4971,6 +4971,8 @@ $(document).ready(function () { $(this).toggleClass('hiddenBySearch', !isValidSearch); }); } + + setCharListVisible(); }); $("#send_but").click(function () { @@ -6211,12 +6213,12 @@ $(document).ready(function () { //$children.each(function () { setCharListVisible($(this)) }); $("#rm_print_characters_block").on('scroll', debounce(function () { - const containerHeight = $children.length * $children.first().outerHeight(); + const containerHeight = $children.length * $children.find(':visible').first().outerHeight(); $("#rm_print_characters_block").css('height', containerHeight); //show and hide on scroll setCharListVisible(); }, 1)); - //delay timer to allow for charlist to populate, + //delay timer to allow for charlist to populate, //should be set to an onload for rm_print_characters or windows? }, 1000); diff --git a/public/scripts/tags.js b/public/scripts/tags.js index 796a8f0d3..e3ce66474 100644 --- a/public/scripts/tags.js +++ b/public/scripts/tags.js @@ -1,4 +1,4 @@ -import { characters, saveSettingsDebounced, this_chid, callPopup, menu_type } from "../script.js"; +import { characters, saveSettingsDebounced, this_chid, callPopup, menu_type, setCharListVisible } from "../script.js"; import { selected_group } from "./group-chats.js"; export { @@ -50,6 +50,8 @@ function applyFavFilter() { } } }); + + setCharListVisible(); } function filterByGroups() { @@ -61,6 +63,8 @@ function filterByGroups() { $(CHARACTER_SELECTOR).each((_, element) => { $(element).toggleClass('hiddenByGroup', displayGroupsOnly && !$(element).hasClass('group_select')); }); + + setCharListVisible(); } function loadTagsSettings(settings) { @@ -234,6 +238,8 @@ function onTagFilterClick(listElement) { const tagIds = [...($(listElement).find(".tag.selected:not(.actionable)").map((_, el) => $(el).attr("id")))]; $(CHARACTER_SELECTOR).each((_, element) => applyFilterToElement(tagIds, element)); + + setCharListVisible(); } function applyFilterToElement(tagIds, element) { @@ -438,4 +444,4 @@ $(document).ready(() => { $(document).on("click", ".tags_view", onViewTagsListClick); $(document).on("click", ".tag_delete", onTagDeleteClick); $(document).on("input", ".tag_view_name", onTagRenameInput); -}); \ No newline at end of file +});