mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-14 12:18:30 +03:00
More sort, still not perfect
This proves to be more difficult than I thought
This commit is contained in:
parent
edf7f6039c
commit
4d14da35a4
1 changed files with 2 additions and 0 deletions
|
@ -122,6 +122,8 @@ export function groupContext(items) {
|
|||
if (!a.inReplyToId && !b.inReplyToId) {
|
||||
return new Date(a.createdAt) - new Date(b.createdAt);
|
||||
}
|
||||
if (a.inReplyToId === b.id) return 1;
|
||||
if (b.inReplyToId === a.id) return -1;
|
||||
if (!a.inReplyToId) return -1;
|
||||
if (!b.inReplyToId) return 1;
|
||||
return new Date(a.createdAt) - new Date(b.createdAt);
|
||||
|
|
Loading…
Add table
Reference in a new issue