Display replies by same author first
This commit is contained in:
parent
b531145270
commit
54777fc12f
1 changed files with 7 additions and 1 deletions
|
@ -82,7 +82,7 @@
|
||||||
:key="note.id"
|
:key="note.id"
|
||||||
:note="note"
|
:note="note"
|
||||||
class="reply"
|
class="reply"
|
||||||
:conversation="directQuotes"
|
:conversation="replies"
|
||||||
:detailedView="true"
|
:detailedView="true"
|
||||||
/>
|
/>
|
||||||
<MkLoading v-else-if="tab === 'quotes' && directQuotes.length > 0" />
|
<MkLoading v-else-if="tab === 'quotes' && directQuotes.length > 0" />
|
||||||
|
@ -357,6 +357,12 @@ os.api("notes/children", {
|
||||||
limit: 30,
|
limit: 30,
|
||||||
depth: 12,
|
depth: 12,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
|
res = res.reduce((acc, note) => {
|
||||||
|
if (note.userId == appearNote.userId) {
|
||||||
|
return [...acc, note];
|
||||||
|
}
|
||||||
|
return [note, ...acc];
|
||||||
|
}, []);
|
||||||
replies.value = res;
|
replies.value = res;
|
||||||
directReplies = res
|
directReplies = res
|
||||||
.filter((note) => note.replyId === appearNote.id)
|
.filter((note) => note.replyId === appearNote.id)
|
||||||
|
|
Loading…
Reference in a new issue