make popular tags for order:rank higher priority in list

This commit is contained in:
Albert Yi
2018-11-07 16:19:48 -08:00
parent 572645d888
commit 8515bf43b4

View File

@@ -20,14 +20,14 @@ module PostSetPresenters
pattern_tags
elsif post_set.is_saved_search?
SavedSearch.labels_for(CurrentUser.user.id).map {|x| "search:#{x}"}
elsif post_set.is_empty_tag? || post_set.tag_string == "order:rank"
popular_tags
elsif post_set.is_single_tag?
related_tags_for_single(post_set.tag_string)
elsif post_set.unordered_tag_array.size == 1
related_tags_for_single(post_set.unordered_tag_array.first)
elsif Tag.has_metatag?(post_set.tag_array, *Tag::SUBQUERY_METATAGS)
calculate_related_tags_from_post_set
elsif post_set.is_empty_tag? || post_set.tag_string == "order:rank"
popular_tags
else
related_tags_for_group
end