diff options
| author | Shpuld Shpludson <shp@cock.li> | 2020-10-01 12:54:54 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2020-10-01 12:54:54 +0000 |
| commit | 8a34ff2957e28f7531c62c793ea4f24558e08ced (patch) | |
| tree | a631749e1fe647085d2ea328b5840b56b344b04e /src/components/conversation/conversation.js | |
| parent | fa9176651952468ee996abe0e67d62d9a72d5a69 (diff) | |
| parent | 68c2a5b18f887f3db2f5685953bc5175aaaabbd3 (diff) | |
Merge branch 'develop' into 'feat/masto-ws-deletes'
# Conflicts:
# CHANGELOG.md
# src/components/status/status.js
# src/components/status/status.scss
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: { |
