Tag Filters: Fix the debounce redrawing again

This commit is contained in:
Wolfsblvt 2024-03-13 02:18:25 +01:00
parent 9aadc7c32b
commit 81503b7bd5
1 changed files with 7 additions and 5 deletions

View File

@ -45,6 +45,12 @@ function getFilterHelper(listSelector) {
return $(listSelector).is(GROUP_FILTER_SELECTOR) ? groupCandidatesFilter : entitiesFilter;
}
const redrawCharsAndFiltersDebounced = debounce(() => {
printCharacters(false);
printTagFilters(tag_filter_types.character);
printTagFilters(tag_filter_types.group_member);
}, 100);
export const tag_filter_types = {
character: 0,
group_member: 1,
@ -848,11 +854,7 @@ function makeTagListDraggable(tagContainer) {
saveSettingsDebounced();
// If the order of tags in display has changed, we need to redraw some UI elements. Do it debounced so it doesn't block and you can drag multiple tags.
debounce(() => {
printCharacters(false);
printTagFilters(tag_filter_types.character);
printTagFilters(tag_filter_types.group_member);
}, 100);
redrawCharsAndFiltersDebounced();
};
// @ts-ignore