mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: Topic list nav items count not respecting tracked filter. (#16935)
This commit seeks to only handle the `f=tracked` and `filter=tracked` query params for a topic list. There are other "hidden" filters for a topic list which can be activated by passing the right query param to the request. However, they are hidden because there is no way to activate those filters via the UI. We are handling the `f=tracked` filter because we will soon be adding a link that allows a user to quickly view their tracked topics.
This commit is contained in:

committed by
GitHub

parent
098bea19de
commit
1e9f132b15
@ -345,6 +345,9 @@ class TopicQuery
|
||||
regular: TopicUser.notification_levels[:regular], tracking: TopicUser.notification_levels[:tracking])
|
||||
end
|
||||
|
||||
# Any changes here will need to be reflected in `lib/topic-list-tracked-filter.js` for the `isTrackedTopic` function on
|
||||
# the client side. The `f=tracked` query param is not heavily used so we do not want to be querying for a topic's
|
||||
# tracked status by default. Instead, the client will handle the filtering when the `f=tracked` query params is present.
|
||||
def self.tracked_filter(list, user_id)
|
||||
tracked_category_ids_sql = <<~SQL
|
||||
SELECT cd.category_id FROM category_users cd
|
||||
|
Reference in New Issue
Block a user