diff options
| author | Shpuld Shpludson <shp@cock.li> | 2020-11-06 17:27:25 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2020-11-06 17:27:25 +0000 |
| commit | 23232e1c8f35d7ddc8adb7a6dbf813b2831c90ec (patch) | |
| tree | b0c8c409d3af0901cb47de648ccbea53da89c16d /src/components/conversation/conversation.js | |
| parent | b225c3578f3c89af5ed3a0be3f8f3a6bbcedcc7d (diff) | |
| parent | 60983ae42b584694de0211ca67ef72d492a293c9 (diff) | |
Merge branch 'develop' into 'master'
Merge develop into master for 2.2.0
See merge request pleroma/pleroma-fe!1278
Diffstat (limited to 'src/components/conversation/conversation.js')
| -rw-r--r-- | src/components/conversation/conversation.js | 20 |
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: { |
