kopia lustrzana https://github.com/cheeaun/phanpy
More sort, still not perfect
This proves to be more difficult than I thoughtpull/122/head
rodzic
edf7f6039c
commit
4d14da35a4
|
@ -122,6 +122,8 @@ export function groupContext(items) {
|
||||||
if (!a.inReplyToId && !b.inReplyToId) {
|
if (!a.inReplyToId && !b.inReplyToId) {
|
||||||
return new Date(a.createdAt) - new Date(b.createdAt);
|
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 (!a.inReplyToId) return -1;
|
||||||
if (!b.inReplyToId) return 1;
|
if (!b.inReplyToId) return 1;
|
||||||
return new Date(a.createdAt) - new Date(b.createdAt);
|
return new Date(a.createdAt) - new Date(b.createdAt);
|
||||||
|
|
Ładowanie…
Reference in New Issue