FEATURE: Add new/unread counts to tags section links exp sidebar (#17057)

This commit is contained in:
Alan Guo Xiang Tan
2022-06-13 14:54:01 +08:00
committed by GitHub
parent 95fa4c5d52
commit e9a77e7f19
8 changed files with 281 additions and 19 deletions

View File

@@ -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