mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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
|
return nil unless object.user_data
|
||||||
object.user_data.last_read_post_number
|
object.user_data.last_read_post_number
|
||||||
end
|
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
|
def unread
|
||||||
unread_helper.unread_posts
|
unread_helper.unread_posts
|
||||||
end
|
end
|
||||||
alias :include_unread? :seen
|
alias :include_unread? :has_user_data
|
||||||
|
|
||||||
def new_posts
|
def new_posts
|
||||||
unread_helper.new_posts
|
unread_helper.new_posts
|
||||||
end
|
end
|
||||||
alias :include_new_posts? :seen
|
alias :include_new_posts? :has_user_data
|
||||||
|
|
||||||
def include_excerpt?
|
def include_excerpt?
|
||||||
pinned
|
pinned
|
||||||
|
@ -13,7 +13,7 @@ class TopicListItemSerializer < ListableTopicSerializer
|
|||||||
def starred
|
def starred
|
||||||
object.user_data.starred?
|
object.user_data.starred?
|
||||||
end
|
end
|
||||||
alias :include_starred? :seen
|
alias :include_starred? :has_user_data
|
||||||
|
|
||||||
def posters
|
def posters
|
||||||
object.posters || []
|
object.posters || []
|
||||||
|
Loading…
Reference in New Issue
Block a user