[Glitch] Fix replies order
Port cb7eb372ccf9f64ad528bd75de69306e84673bc4 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
1 parent
f9041ac4a7
commit
adea1099bc
1 file changed
+3
-1
@@ -55,7 +55,9 @@ const addReply = (
|
||||
|
||||
if (!state.inReplyTos[id]) {
|
||||
const siblings = (state.replies[in_reply_to_id] ??= []);
|
||||
const index = siblings.findIndex((sibling) => compareId(sibling, id) < 0);
|
||||
const index = siblings.findLastIndex(
|
||||
(sibling) => compareId(sibling, id) < 0,
|
||||
);
|
||||
siblings.splice(index + 1, 0, id);
|
||||
state.inReplyTos[id] = in_reply_to_id;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user