回复倒序排列
This commit is contained in:
parent
f1783c06a2
commit
c8e769e05b
|
@ -42,7 +42,7 @@ module Mobile
|
|||
blog_comment_expose :blog_praise_count
|
||||
expose :blog_comment_children, using:Mobile::Entities::BlogComment do |c,opt|
|
||||
if c.is_a? (::BlogComment)
|
||||
c.children
|
||||
c.children.reverse
|
||||
end
|
||||
end
|
||||
expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options|
|
||||
|
|
|
@ -46,7 +46,7 @@ module Mobile
|
|||
issue_expose :issue_praise_count
|
||||
expose :issue_journals, using: Mobile::Entities::Journal do |f, opt|
|
||||
if f.is_a?(::Issue)
|
||||
f.journals.where("notes is not null and notes != ''")
|
||||
f.journals.where("notes is not null and notes != ''").reverse
|
||||
end
|
||||
end
|
||||
expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options|
|
||||
|
|
|
@ -48,7 +48,7 @@ module Mobile
|
|||
end
|
||||
expose :child_reply,using: Mobile::Entities::Jours do |f, opt|
|
||||
if f.is_a?(::JournalsForMessage)
|
||||
f.children
|
||||
f.children.reverse
|
||||
end
|
||||
end
|
||||
expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options|
|
||||
|
|
|
@ -49,7 +49,7 @@ module Mobile
|
|||
message_expose :lasted_comment
|
||||
expose :message_children,using:Mobile::Entities::Message do |c,opt|
|
||||
if c.is_a? (::Message)
|
||||
c.children
|
||||
c.children.reverse
|
||||
end
|
||||
end
|
||||
expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options|
|
||||
|
|
|
@ -70,7 +70,7 @@ module Mobile
|
|||
if f.is_a?(Hash) && f.key?(:comments)
|
||||
f[:comments]
|
||||
elsif f.is_a?(::News) && f.respond_to?(:comments)
|
||||
f.send(:comments)
|
||||
f.comments.reverse
|
||||
end
|
||||
end
|
||||
expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options|
|
||||
|
|
|
@ -64,7 +64,7 @@ module Mobile
|
|||
expose :journals_for_messages, using: Mobile::Entities::Jours do |f, opt|
|
||||
#f[:journals_for_messages] if f.is_a?(Hash) && f.key?(:journals_for_messages)
|
||||
if f.is_a?(::HomeworkCommon)
|
||||
f.journals_for_messages
|
||||
f.journals_for_messages.reverse
|
||||
end
|
||||
end
|
||||
expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options|
|
||||
|
|
Loading…
Reference in New Issue