aboutsummaryrefslogtreecommitdiff
path: root/src/components/thread_tree/thread_tree.js
diff options
context:
space:
mode:
authorTusooa Zhu <tusooa@kazv.moe>2021-09-15 23:35:17 -0400
committerTusooa Zhu <tusooa@kazv.moe>2022-03-07 19:19:31 -0500
commit2a510205c3e18bc1c3ff253dc4521909857cd530 (patch)
tree3e454664ace75da1ba9203b22b6ef8e4533a3831 /src/components/thread_tree/thread_tree.js
parent0db5a5a581aa6560637dd85886dfd9d7934f40fa (diff)
Fix virtual scrolling for tree threading
Ref: tree-threading
Diffstat (limited to 'src/components/thread_tree/thread_tree.js')
-rw-r--r--src/components/thread_tree/thread_tree.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/components/thread_tree/thread_tree.js b/src/components/thread_tree/thread_tree.js
index cb1d2242..fd21c5bc 100644
--- a/src/components/thread_tree/thread_tree.js
+++ b/src/components/thread_tree/thread_tree.js
@@ -48,6 +48,13 @@ const ThreadTree = {
dive: Function
},
computed: {
+ suspendable () {
+ const selfSuspendable = this.$refs.statusComponent ? this.$refs.statusComponent.suspendable : true
+ if (this.$refs.childComponent) {
+ return selfSuspendable && this.$refs.childComponent.every(s => s.suspendable)
+ }
+ return selfSuspendable
+ },
reverseLookupTable () {
return this.conversation.reduce((table, status, index) => {
table[status.id] = index