simplify conversation code

This commit is contained in:
Freeplay 2023-05-18 15:48:36 -04:00
parent fb06aecb7b
commit e921e2dce3

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">
<template v-if="replies.length == 1">
<MkNoteSub
v-for="reply in replies"
:key="reply.id"
:note="reply"
class="reply single"
:conversation="conversation"
:depth="depth"
:replyLevel="replyLevel + 1"
:parentId="appearNote.replyId"
:detailedView="detailedView"
/>
</template>
<template v-else>
<MkNoteSub <MkNoteSub
v-if="replyLevel < 11 && depth < 5"
v-for="reply in replies" v-for="reply in replies"
:key="reply.id" :key="reply.id"
:note="reply" :note="reply"
class="reply" class="reply"
:class="{single: replies.length == 1}"
:conversation="conversation" :conversation="conversation"
:depth="depth + 1" :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>
<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)"