mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: remove star concept from Discourse
This commit is contained in:
@@ -2,7 +2,6 @@ class TopicListItemSerializer < ListableTopicSerializer
|
||||
|
||||
attributes :views,
|
||||
:like_count,
|
||||
:starred,
|
||||
:has_summary,
|
||||
:archetype,
|
||||
:last_poster_username,
|
||||
@@ -13,12 +12,6 @@ class TopicListItemSerializer < ListableTopicSerializer
|
||||
has_many :posters, serializer: TopicPosterSerializer, embed: :objects
|
||||
has_many :participants, serializer: TopicPosterSerializer, embed: :objects
|
||||
|
||||
def starred
|
||||
object.user_data.starred?
|
||||
end
|
||||
|
||||
alias :include_starred? :has_user_data
|
||||
|
||||
def posters
|
||||
object.posters || []
|
||||
end
|
||||
|
||||
@@ -29,7 +29,6 @@ class TopicViewSerializer < ApplicationSerializer
|
||||
attributes :draft,
|
||||
:draft_key,
|
||||
:draft_sequence,
|
||||
:starred,
|
||||
:posted,
|
||||
:unpinned,
|
||||
:pinned_globally,
|
||||
@@ -145,11 +144,6 @@ class TopicViewSerializer < ApplicationSerializer
|
||||
object.topic_user.present?
|
||||
end
|
||||
|
||||
def starred
|
||||
object.topic_user.starred?
|
||||
end
|
||||
alias_method :include_starred?, :has_topic_user?
|
||||
|
||||
def highest_post_number
|
||||
object.highest_post_number
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user