sort of fix replies count ?

This commit is contained in:
Freeplay 2023-02-25 11:57:16 -05:00
parent 6652636e09
commit a76e94c941
2 changed files with 8 additions and 2 deletions

View File

@ -4,7 +4,12 @@
<button v-tooltip.noDelay.bottom="i18n.ts.reply" class="button _button" @click="reply()"> <button v-tooltip.noDelay.bottom="i18n.ts.reply" class="button _button" @click="reply()">
<template v-if="appearNote.reply"><i class="ph-arrow-u-up-left-bold ph-lg"></i></template> <template v-if="appearNote.reply"><i class="ph-arrow-u-up-left-bold ph-lg"></i></template>
<template v-else><i class="ph-arrow-bend-up-left-bold ph-lg"></i></template> <template v-else><i class="ph-arrow-bend-up-left-bold ph-lg"></i></template>
<p v-if="appearNote.repliesCount > 0" class="count">{{ appearNote.repliesCount }}</p> <template v-if="directReplies > 0">
<p class="count">{{ directReplies }}</p>
</template>
<template v-else-if="appearNote.repliesCount > 0">
<p class="count">{{ appearNote.repliesCount }}</p>
</template>
</button> </button>
<XRenoteButton ref="renoteButton" class="button" :note="appearNote" :count="appearNote.renoteCount"/> <XRenoteButton ref="renoteButton" class="button" :note="appearNote" :count="appearNote.renoteCount"/>
<XStarButton v-if="appearNote.myReaction == null" ref="starButton" class="button" :note="appearNote"/> <XStarButton v-if="appearNote.myReaction == null" ref="starButton" class="button" :note="appearNote"/>
@ -40,6 +45,7 @@ import { useNoteCapture } from '@/scripts/use-note-capture';
const props = defineProps<{ const props = defineProps<{
note: misskey.entities.Note; note: misskey.entities.Note;
directReplies;
}>(); }>();
let note = $ref(deepClone(props.note)); let note = $ref(deepClone(props.note));

View File

@ -17,7 +17,7 @@
<MkSubNoteContent class="text" :note="note" :detailed="true"/> <MkSubNoteContent class="text" :note="note" :detailed="true"/>
</div> </div>
</div> </div>
<MkNoteFooter :note="note"></MkNoteFooter> <MkNoteFooter :note="note" :directReplies="replies.length"></MkNoteFooter>
</div> </div>
</div> </div>
<template v-if="conversation"> <template v-if="conversation">