diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index 08283fff8..ff99300a6 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -35,7 +35,9 @@ const conversation = { data () { return { highlight: null, - expanded: false + expanded: false, + // Approximate minimum height of a status, gets overwritten with real one + virtualHeight: '120px' } }, props: [ @@ -44,7 +46,8 @@ const conversation = { 'isPage', 'pinnedStatusIdsObject', 'inProfile', - 'profileUserId' + 'profileUserId', + 'virtualHidden' ], created () { if (this.isPage) { @@ -102,6 +105,9 @@ const conversation = { }, isExpanded () { return this.expanded || this.isPage + }, + hiddenStyle () { + return this.virtualHidden ? { height: this.virtualHeight } : {} } }, components: { @@ -121,6 +127,9 @@ const conversation = { if (value) { this.fetchConversation() } + }, + virtualHidden (value) { + this.virtualHeight = `${this.$el.clientHeight}px` } }, methods: { diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue index 2e48240aa..e74b9ccf6 100644 --- a/src/components/conversation/conversation.vue +++ b/src/components/conversation/conversation.vue @@ -1,10 +1,11 @@