mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 09:23:43 +08:00
fix build
This commit is contained in:
parent
172d0ffd08
commit
4f6cef01e4
|
@ -43,17 +43,22 @@ class ListableTopicSerializer < BasicTopicSerializer
|
|||
return nil unless object.user_data
|
||||
object.user_data.last_read_post_number
|
||||
end
|
||||
alias :include_last_read_post_number? :seen
|
||||
|
||||
def has_user_data
|
||||
!!object.user_data
|
||||
end
|
||||
|
||||
alias :include_last_read_post_number? :has_user_data
|
||||
|
||||
def unread
|
||||
unread_helper.unread_posts
|
||||
end
|
||||
alias :include_unread? :seen
|
||||
alias :include_unread? :has_user_data
|
||||
|
||||
def new_posts
|
||||
unread_helper.new_posts
|
||||
end
|
||||
alias :include_new_posts? :seen
|
||||
alias :include_new_posts? :has_user_data
|
||||
|
||||
def include_excerpt?
|
||||
pinned
|
||||
|
|
|
@ -13,7 +13,7 @@ class TopicListItemSerializer < ListableTopicSerializer
|
|||
def starred
|
||||
object.user_data.starred?
|
||||
end
|
||||
alias :include_starred? :seen
|
||||
alias :include_starred? :has_user_data
|
||||
|
||||
def posters
|
||||
object.posters || []
|
||||
|
|
Loading…
Reference in New Issue
Block a user