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'], emits: ['suspendableStateChange', 'goto', 'dive'],
computed: { computed: {
reverseLookupTable() {
return this.conversation.reduce(
(table, statusId, index) => {
table[statusId] = index
return table
},
{
/* no-op */
},
)
},
currentReplies() { currentReplies() {
return this.getReplies(this.statusId).map(({ id }) => this.statusById(id)) return this.getReplies(this.statusId).map(({ id }) => id)
}, },
threadShowing() { threadShowing() {
return this.threadDisplayStatus[this.statusId] === 'showing' return this.threadDisplayStatus[this.statusId] === 'showing'
}, },
}, },
methods: {
statusById(id) {
return this.conversation[this.reverseLookupTable[id]]
},
},
} }
export default ThreadTree export default ThreadTree

View file

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