Merge pull request #1015 from bdashore3/staging

This commit is contained in:
Cohee 2023-08-25 10:08:56 +03:00 committed by GitHub
commit f48f7a98fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -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 excludedTagIds = [...($(listElement).find(".tag.excluded:not(.actionable)").map((_, el) => $(el).attr("id")))];
const filterHelper = getFilterHelper($(listElement));
@ -364,6 +368,9 @@ function printTagFilters(type = tag_filter_types.character) {
}
for (const tag of tagsToDisplay) {
appendTagToList(FILTER_SELECTOR, tag, { removable: false, selectable: true, isGeneralList: true });
if (tag.excluded) {
runTagFilters(FILTER_SELECTOR);
}
}
for (const tagId of selectedTagIds) {