mirror of
https://github.com/discourse/discourse.git
synced 2026-08-14 06:55:03 -05:00
FEATURE: hide muted categories from /categories list (#6531)
This commit is contained in:
@@ -20,6 +20,7 @@ class CategoryList
|
||||
find_categories
|
||||
|
||||
prune_empty
|
||||
prune_muted
|
||||
find_user_data
|
||||
sort_unpinned
|
||||
trim_results
|
||||
@@ -136,6 +137,10 @@ class CategoryList
|
||||
@categories.delete_if { |c| c.uncategorized? && c.displayable_topics.blank? }
|
||||
end
|
||||
|
||||
def prune_muted
|
||||
@categories.delete_if { |c| c.notification_level == CategoryUser.notification_levels[:muted] }
|
||||
end
|
||||
|
||||
# Attach some data for serialization to each topic
|
||||
def find_user_data
|
||||
if @guardian.current_user && @all_topics.present?
|
||||
|
||||
Reference in New Issue
Block a user