fixes for virtual scrolling
This commit is contained in:
parent
24fb1300b5
commit
39e385bb48
4 changed files with 11 additions and 10 deletions
|
|
@ -155,9 +155,9 @@ const conversation = {
|
|||
return this.otherRepliesButtonPosition === 'inside'
|
||||
},
|
||||
suspendable() {
|
||||
return this.unsuspendibleIds.size > 0
|
||||
return this.unsuspendibleIds.size === 0
|
||||
},
|
||||
hideStatus() {
|
||||
hide() {
|
||||
return this.virtualHidden && this.suspendable
|
||||
},
|
||||
originalStatusId() {
|
||||
|
|
@ -365,7 +365,6 @@ const conversation = {
|
|||
return !!(this.expanded || this.isPage)
|
||||
},
|
||||
hiddenStyle() {
|
||||
if (this.isExpanded || !this.virtualHidden) return {}
|
||||
return { height: this.virtualHeight + 'px' }
|
||||
},
|
||||
threadDisplayStatus() {
|
||||
|
|
@ -621,6 +620,7 @@ const conversation = {
|
|||
}
|
||||
},
|
||||
updateVirtualHeight() {
|
||||
if (this.hide) return // no updates when not rendering
|
||||
this.$nextTick(() => {
|
||||
this.virtualHeight = this.$refs.body.getBoundingClientRect().height
|
||||
this.$emit('update:virtualHeight', {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<template>
|
||||
<div
|
||||
v-if="!hideStatus"
|
||||
:style="hiddenStyle"
|
||||
v-if="!hide"
|
||||
class="Conversation"
|
||||
:class="{ '-expanded' : isExpanded, 'panel' : isExpanded }"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -128,7 +128,6 @@ const Status = {
|
|||
return {
|
||||
replying: false,
|
||||
unmuted: false,
|
||||
userExpanded: false,
|
||||
mediaPlaying: new Set(),
|
||||
error: null,
|
||||
headTailLinks: null,
|
||||
|
|
@ -524,9 +523,6 @@ const Status = {
|
|||
toggleMute() {
|
||||
this.unmuted = !this.unmuted
|
||||
},
|
||||
toggleUserExpanded() {
|
||||
this.userExpanded = !this.userExpanded
|
||||
},
|
||||
generateUserProfileLink(id, name) {
|
||||
return generateProfileLink(
|
||||
id,
|
||||
|
|
@ -576,6 +572,12 @@ const Status = {
|
|||
this.$emit('heightChange')
|
||||
},
|
||||
},
|
||||
unmuted() {
|
||||
this.$emit('heightChange')
|
||||
},
|
||||
error() {
|
||||
this.$emit('heightChange')
|
||||
},
|
||||
replying() {
|
||||
this.$emit('heightChange')
|
||||
},
|
||||
|
|
@ -604,7 +606,6 @@ const Status = {
|
|||
},
|
||||
isSuspendable: function (suspend) {
|
||||
this.$emit('suspendableStateChange', { id: this.status.id, suspend })
|
||||
this.$emit('heightChange')
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -549,6 +549,7 @@
|
|||
@posted="closeReplyForm"
|
||||
@draft-done="closeReplyForm"
|
||||
@close-accepted="closeReplyForm"
|
||||
@resize="$emit('heightChange')"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue