fix: Some SubNote incorrectly added replies
This commit is contained in:
parent
39a229b875
commit
e5e2eedfb4
3 changed files with 11 additions and 3 deletions
|
@ -94,6 +94,7 @@
|
|||
:auto-conversation="true"
|
||||
:detailed-view="true"
|
||||
:parent-id="note.id"
|
||||
:auto-add-replies="true"
|
||||
/>
|
||||
</MkPagination>
|
||||
|
||||
|
@ -110,6 +111,7 @@
|
|||
:auto-conversation="true"
|
||||
:detailed-view="true"
|
||||
:parent-id="note.id"
|
||||
:auto-add-replies="true"
|
||||
/>
|
||||
</MkPagination>
|
||||
|
||||
|
|
|
@ -164,6 +164,7 @@
|
|||
:reply-level="replyLevel + 1"
|
||||
:parent-id="appearNote.id"
|
||||
:detailed-view="detailedView"
|
||||
:auto-add-replies="true"
|
||||
/>
|
||||
<div v-if="hasMoreReplies" class="more">
|
||||
<div class="line"></div>
|
||||
|
@ -247,10 +248,12 @@ const props = withDefaults(
|
|||
depth?: number;
|
||||
// the actual reply level of this note within the conversation thread
|
||||
replyLevel?: number;
|
||||
autoAddReplies?: boolean;
|
||||
}>(),
|
||||
{
|
||||
depth: 1,
|
||||
replyLevel: 1,
|
||||
autoAddReplies: false,
|
||||
},
|
||||
);
|
||||
|
||||
|
@ -376,6 +379,9 @@ useNoteCapture({
|
|||
note: appearNote,
|
||||
isDeletedRef: isDeleted,
|
||||
onReplied: (note) => {
|
||||
if (props.autoAddReplies !== true) {
|
||||
return;
|
||||
}
|
||||
if (hasMoreReplies.value === false) {
|
||||
conversation.value = (conversation.value ?? []).concat([note]);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<p v-if="note.cw != null" class="cw">
|
||||
<MkA
|
||||
v-if="conversation && note.renoteId == parentId"
|
||||
v-if="conversation && note.renoteId == parentId && parentId != null"
|
||||
:to="
|
||||
detailedView ? `#${parentId}` : `${notePage(note)}#${parentId}`
|
||||
"
|
||||
|
@ -198,8 +198,8 @@ import icon from "@/scripts/icon";
|
|||
|
||||
const props = defineProps<{
|
||||
note: entities.Note;
|
||||
parentId?;
|
||||
conversation?;
|
||||
parentId?: string;
|
||||
conversation?: entities.Note[];
|
||||
detailed?: boolean;
|
||||
detailedView?: boolean;
|
||||
}>();
|
||||
|
|
Loading…
Reference in a new issue