mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: shows a hint when there are more tags than displayed (#12649)
This commit is contained in:
@@ -95,7 +95,9 @@ class Tag < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def self.top_tags(limit_arg: nil, category: nil, guardian: nil)
|
||||
limit = limit_arg || SiteSetting.max_tags_in_filter_list
|
||||
# we add 1 to max_tags_in_filter_list to efficiently know we have more tags
|
||||
# than the limit. Frontend is responsible to enforce limit.
|
||||
limit = limit_arg || (SiteSetting.max_tags_in_filter_list + 1)
|
||||
scope_category_ids = (guardian || Guardian.new).allowed_category_ids
|
||||
|
||||
if category
|
||||
|
||||
Reference in New Issue
Block a user