mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Tags: Fix exclusion on load
The new filter system wasn't applying when tags are loaded. Fix this by adding an extra step in the for loop. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -338,6 +338,10 @@ function onTagFilterClick(listElement) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
runTagFilters(listElement);
|
||||||
|
}
|
||||||
|
|
||||||
|
function runTagFilters(listElement) {
|
||||||
const tagIds = [...($(listElement).find(".tag.selected:not(.actionable)").map((_, el) => $(el).attr("id")))];
|
const tagIds = [...($(listElement).find(".tag.selected:not(.actionable)").map((_, el) => $(el).attr("id")))];
|
||||||
const excludedTagIds = [...($(listElement).find(".tag.excluded:not(.actionable)").map((_, el) => $(el).attr("id")))];
|
const excludedTagIds = [...($(listElement).find(".tag.excluded:not(.actionable)").map((_, el) => $(el).attr("id")))];
|
||||||
const filterHelper = getFilterHelper($(listElement));
|
const filterHelper = getFilterHelper($(listElement));
|
||||||
@@ -364,6 +368,9 @@ function printTagFilters(type = tag_filter_types.character) {
|
|||||||
}
|
}
|
||||||
for (const tag of tagsToDisplay) {
|
for (const tag of tagsToDisplay) {
|
||||||
appendTagToList(FILTER_SELECTOR, tag, { removable: false, selectable: true, isGeneralList: true });
|
appendTagToList(FILTER_SELECTOR, tag, { removable: false, selectable: true, isGeneralList: true });
|
||||||
|
if (tag.excluded) {
|
||||||
|
runTagFilters(FILTER_SELECTOR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const tagId of selectedTagIds) {
|
for (const tagId of selectedTagIds) {
|
||||||
|
Reference in New Issue
Block a user