From 54777fc12f9f833209bd8587ca8371ed91e0628e 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 774a10fc6c..b3d22d7acd 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)