feat: make new reply display first

This commit is contained in:
CMK 2021-04-14 11:22:54 +08:00
parent fccf9ee080
commit 8df3b7d464
1 changed files with 1 additions and 1 deletions

View File

@ -263,7 +263,7 @@ extension ThreadViewModel {
) -> LeafNode? {
guard let object = objectDict[statusID] else { return nil }
let replies = (object.replyFrom ?? Set()).sorted(
by: { $0.repliesCount?.intValue ?? 0 < $1.repliesCount?.intValue ?? 0 }
by: { $0.createdAt > $1.createdAt } // order by date
)
let children = replies.compactMap { node(of: $0.id, objectDict: objectDict) }
return LeafNode(