Add continuation for thread reply level (#9821)

I think this will solve the continuation issue in threads where the reply level reaches 12 deep in the conversation thread, without getting to indent depth 5.

Co-authored-by: Kaity A <kaity@theallans.com.au>
Co-authored-by: Kaity A <supakaity@blahaj.zone>
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9821
Co-authored-by: Kaity A <supakaity@noreply.codeberg.org>
Co-committed-by: Kaity A <supakaity@noreply.codeberg.org>
This commit is contained in:
Kaity A 2023-04-15 21:56:17 +00:00 committed by Kainoa Kanter
parent 0a3259993b
commit 011b482e98

View file

@ -142,6 +142,7 @@
</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"> <template v-if="replies.length == 1">
<MkNoteSub <MkNoteSub
v-for="reply in replies" v-for="reply in replies"
@ -150,10 +151,11 @@
class="reply single" class="reply single"
:conversation="conversation" :conversation="conversation"
:depth="depth" :depth="depth"
:replyLevel="replyLevel + 1"
:parentId="appearNote.replyId" :parentId="appearNote.replyId"
/> />
</template> </template>
<template v-else-if="depth < 5"> <template v-else>
<MkNoteSub <MkNoteSub
v-for="reply in replies" v-for="reply in replies"
:key="reply.id" :key="reply.id"
@ -161,9 +163,11 @@
class="reply" class="reply"
:conversation="conversation" :conversation="conversation"
:depth="depth + 1" :depth="depth + 1"
:replyLevel="replyLevel + 1"
:parentId="appearNote.replyId" :parentId="appearNote.replyId"
/> />
</template> </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)"
@ -206,9 +210,12 @@ const props = withDefaults(
// how many notes are in between this one and the note being viewed in detail // how many notes are in between this one and the note being viewed in detail
depth?: number; depth?: number;
// the actual reply level of this note within the conversation thread
replyLevel?: number;
}>(), }>(),
{ {
depth: 1, depth: 1,
replyLevel: 1,
} }
); );