From b11262ad520e76e223f49a52a9444f4e41a0fa5d Mon Sep 17 00:00:00 2001 From: jessop Date: Thu, 26 Mar 2020 21:10:05 -0400 Subject: [PATCH] remove selected tags from suggestions --- ui/component/tagsSearch/view.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/component/tagsSearch/view.jsx b/ui/component/tagsSearch/view.jsx index cd026f68c..da0f268e7 100644 --- a/ui/component/tagsSearch/view.jsx +++ b/ui/component/tagsSearch/view.jsx @@ -60,7 +60,8 @@ export default function TagsSearch(props: Props) { const selectedTagsSet = new Set(tagsPassedIn.map(tag => tag.name)); const unfollowedTagsSet = new Set(unfollowedTags.map(tag => tag.name)); const remainingFollowedTagsSet = setDifference(followedTagsSet, selectedTagsSet); - const suggestedTagsSet = setUnion(remainingFollowedTagsSet, unfollowedTagsSet); + const remainingUnfollowedTagsSet = setDifference(unfollowedTagsSet, selectedTagsSet); + const suggestedTagsSet = setUnion(remainingFollowedTagsSet, remainingUnfollowedTagsSet); const countWithoutMature = selectedTagsSet.has('mature') ? selectedTagsSet.size - 1 : selectedTagsSet.size; const maxed = Boolean(limitSelect && countWithoutMature >= limitSelect);