fix thread view
This commit is contained in:
parent
ae5984d2f1
commit
4bba716409
2 changed files with 2 additions and 18 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue