simplify conversation code

This commit is contained in:
Freeplay 2023-05-18 15:48:36 -04:00
parent fb06aecb7b
commit e921e2dce3
1 changed files with 13 additions and 28 deletions

View File

@ -129,34 +129,19 @@
</div> </div>
</div> </div>
<template v-if="conversation"> <template v-if="conversation">
<template v-if="replyLevel < 11 && depth < 5"> <MkNoteSub
<template v-if="replies.length == 1"> v-if="replyLevel < 11 && depth < 5"
<MkNoteSub v-for="reply in replies"
v-for="reply in replies" :key="reply.id"
:key="reply.id" :note="reply"
:note="reply" class="reply"
class="reply single" :class="{single: replies.length == 1}"
:conversation="conversation" :conversation="conversation"
:depth="depth" :depth="replies.lenght == 1 ? depth : depth + 1"
:replyLevel="replyLevel + 1" :replyLevel="replyLevel + 1"
:parentId="appearNote.replyId" :parentId="appearNote.replyId"
:detailedView="detailedView" :detailedView="detailedView"
/> />
</template>
<template v-else>
<MkNoteSub
v-for="reply in replies"
:key="reply.id"
:note="reply"
class="reply"
:conversation="conversation"
:depth="depth + 1"
:replyLevel="replyLevel + 1"
:parentId="appearNote.replyId"
:detailedView="detailedView"
/>
</template>
</template>
<div v-else-if="replies.length > 0" class="more"> <div v-else-if="replies.length > 0" class="more">
<div class="line"></div> <div class="line"></div>
<MkA class="text _link" :to="notePage(note)" <MkA class="text _link" :to="notePage(note)"