aboutsummaryrefslogtreecommitdiff
path: root/src/components/conversation/conversation.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/conversation/conversation.js
parent0db5a5a581aa6560637dd85886dfd9d7934f40fa (diff)
Fix virtual scrolling for tree threading
Ref: tree-threading
Diffstat (limited to 'src/components/conversation/conversation.js')
-rw-r--r--src/components/conversation/conversation.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js
index d4972fbc..1e97bbf0 100644
--- a/src/components/conversation/conversation.js
+++ b/src/components/conversation/conversation.js
@@ -101,13 +101,16 @@ const conversation = {
showOtherRepliesButtonInsideStatus () {
return this.otherRepliesButtonPosition === 'inside'
},
- hideStatus () {
+ suspendable () {
if (this.$refs.statusComponent && this.$refs.statusComponent[0]) {
- return this.virtualHidden && this.$refs.statusComponent[0].suspendable
+ return this.$refs.statusComponent.every(s => s.suspendable)
} else {
- return this.virtualHidden
+ return true
}
},
+ hideStatus () {
+ return this.virtualHidden && this.suspendable
+ },
status () {
return this.$store.state.statuses.allStatusesObject[this.statusId]
},
@@ -243,7 +246,6 @@ const conversation = {
return this.topLevel
},
diveRoot () {
- (() => {})(this.conversation)
const statusId = this.inlineDivePosition || this.statusId
const isTopLevel = !this.parentOf(statusId)
return isTopLevel ? null : statusId
@@ -257,7 +259,10 @@ const conversation = {
shouldShowAllConversationButton () {
// The "show all conversation" button tells the user that there exist
// other toplevel statuses, so do not show it if there is only a single root
- return this.diveMode && this.topLevel.length > 1
+ return this.isTreeView && this.isExpanded && this.diveMode && this.topLevel.length > 1
+ },
+ shouldShowAncestors () {
+ return this.isTreeView && this.isExpanded && this.ancestorsOf(this.diveRoot).length
},
replies () {
let i = 1