fix thread view

This commit is contained in:
Henry Jameson 2026-08-20 21:35:45 +03:00
commit 4bba716409
2 changed files with 2 additions and 18 deletions

View file

@ -32,29 +32,13 @@ const ThreadTree = {
},
emits: ['suspendableStateChange', 'goto', 'dive'],
computed: {
reverseLookupTable() {
return this.conversation.reduce(
(table, statusId, index) => {
table[statusId] = index
return table
},
{
/* no-op */
},
)
},
currentReplies() {
return this.getReplies(this.statusId).map(({ id }) => this.statusById(id))
return this.getReplies(this.statusId).map(({ id }) => id)
},
threadShowing() {
return this.threadDisplayStatus[this.statusId] === 'showing'
},
},
methods: {
statusById(id) {
return this.conversation[this.reverseLookupTable[id]]
},
},
}
export default ThreadTree

View file

@ -28,7 +28,7 @@
class="thread-tree-replies"
>
<ThreadTree
v-for="replyStatus in currentReplies"
v-for="replyStatusId in currentReplies"
:key="replyStatusId"
ref="childComponent"
:depth="depth + 1"