mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Add new/unread counts to tags section links exp sidebar (#17057)
This commit is contained in:
committed by
GitHub
parent
95fa4c5d52
commit
e9a77e7f19
@@ -9,7 +9,8 @@ class TopicTrackingStateSerializer < ApplicationSerializer
|
||||
:notification_level,
|
||||
:created_in_new_period,
|
||||
:unread_not_too_old,
|
||||
:treat_as_new_topic_start_date
|
||||
:treat_as_new_topic_start_date,
|
||||
:tags
|
||||
|
||||
def created_in_new_period
|
||||
return true if !scope
|
||||
@@ -20,4 +21,8 @@ class TopicTrackingStateSerializer < ApplicationSerializer
|
||||
return true if object.first_unread_at.blank?
|
||||
object.updated_at >= object.first_unread_at
|
||||
end
|
||||
|
||||
def include_tags?
|
||||
object.respond_to?(:tags)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user