aboutsummaryrefslogtreecommitdiff
path: root/src/components/conversation/conversation.js
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2020-09-29 10:18:37 +0000
committerShpuld Shpludson <shp@cock.li>2020-09-29 10:18:37 +0000
commit91778a02766602b81ec8737282495aa4b5294d19 (patch)
treeda6bb6092acfb50b441f3afb5c4cc792e0b2b3a4 /src/components/conversation/conversation.js
parent3781e521e64a59c4e38902601555ae01f99d9fce (diff)
parentf174f289a93e6bef1182a2face00bb809da49d18 (diff)
Merge branch 'feat/custom-virtual-scrolling' into 'develop'
Timeline virtual scrolling See merge request pleroma/pleroma-fe!1043
Diffstat (limited to 'src/components/conversation/conversation.js')
-rw-r--r--src/components/conversation/conversation.js20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js
index 45fb2bf6..069c0b40 100644
--- a/src/components/conversation/conversation.js
+++ b/src/components/conversation/conversation.js
@@ -44,7 +44,8 @@ const conversation = {
'isPage',
'pinnedStatusIdsObject',
'inProfile',
- 'profileUserId'
+ 'profileUserId',
+ 'virtualHidden'
],
created () {
if (this.isPage) {
@@ -52,6 +53,13 @@ const conversation = {
}
},
computed: {
+ hideStatus () {
+ if (this.$refs.statusComponent && this.$refs.statusComponent[0]) {
+ return this.virtualHidden && this.$refs.statusComponent[0].suspendable
+ } else {
+ return this.virtualHidden
+ }
+ },
status () {
return this.$store.state.statuses.allStatusesObject[this.statusId]
},
@@ -102,6 +110,10 @@ const conversation = {
},
isExpanded () {
return this.expanded || this.isPage
+ },
+ hiddenStyle () {
+ const height = (this.status && this.status.virtualHeight) || '120px'
+ return this.virtualHidden ? { height } : {}
}
},
components: {
@@ -121,6 +133,12 @@ const conversation = {
if (value) {
this.fetchConversation()
}
+ },
+ virtualHidden (value) {
+ this.$store.dispatch(
+ 'setVirtualHeight',
+ { statusId: this.statusId, height: `${this.$el.clientHeight}px` }
+ )
}
},
methods: {