From 8cd812db83199c40b6427cd68c2ce66ce66ed087 Mon Sep 17 00:00:00 2001 From: Freeplay Date: Wed, 24 May 2023 17:40:16 -0400 Subject: [PATCH] Display replies by same author first --- packages/client/src/components/MkNoteDetailed.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/client/src/components/MkNoteDetailed.vue b/packages/client/src/components/MkNoteDetailed.vue index 774a10fc6..b3d22d7ac 100644 --- a/packages/client/src/components/MkNoteDetailed.vue +++ b/packages/client/src/components/MkNoteDetailed.vue @@ -82,7 +82,7 @@ :key="note.id" :note="note" class="reply" - :conversation="directQuotes" + :conversation="replies" :detailedView="true" /> @@ -357,6 +357,12 @@ os.api("notes/children", { limit: 30, depth: 12, }).then((res) => { + res = res.reduce((acc, note) => { + if (note.userId == appearNote.userId) { + return [...acc, note]; + } + return [note, ...acc]; + }, []); replies.value = res; directReplies = res .filter((note) => note.replyId === appearNote.id)