diff options
| author | Henry Jameson <me@hjkos.com> | 2020-10-17 19:24:07 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2020-10-17 19:24:07 +0300 |
| commit | 29ff0be92cfd87ba95d1f78323794dfb1223b514 (patch) | |
| tree | 79836b7fb5b3e325274a833c34fd4c5f6155ba2d /src/components/conversation/conversation.js | |
| parent | a463959a365a5d618a79c96a26f6506e700d6ea3 (diff) | |
| parent | 3ca729d09880813420a263221cdc68bcca13a1fb (diff) | |
Merge remote-tracking branch 'origin/develop' into settings-changed
* origin/develop: (48 commits)
fix/leftover-emoji-checkboxes-in-settings
Apply 1 suggestion(s) to 1 file(s)
Translated using Weblate (Spanish)
Translated using Weblate (Persian)
Translated using Weblate (Persian)
Translated using Weblate (Polish)
update changelog
Stop click propagation when unhiding nsfw
Fix Follow Requests title style
Translated using Weblate (Persian)
Translated using Weblate (Persian)
Translated using Weblate (French)
Added translation using Weblate (Persian)
Translated using Weblate (Chinese (Traditional))
Translated using Weblate (Chinese (Simplified))
Translated using Weblate (Italian)
Translated using Weblate (English)
Translated using Weblate (English)
Translated using Weblate (Basque)
Translated using Weblate (Spanish)
...
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: { |
