fixes for virtual scrolling

This commit is contained in:
Henry Jameson 2026-08-25 17:51:23 +03:00
commit 39e385bb48
4 changed files with 11 additions and 10 deletions

View file

@ -155,9 +155,9 @@ const conversation = {
return this.otherRepliesButtonPosition === 'inside' return this.otherRepliesButtonPosition === 'inside'
}, },
suspendable() { suspendable() {
return this.unsuspendibleIds.size > 0 return this.unsuspendibleIds.size === 0
}, },
hideStatus() { hide() {
return this.virtualHidden && this.suspendable return this.virtualHidden && this.suspendable
}, },
originalStatusId() { originalStatusId() {
@ -365,7 +365,6 @@ const conversation = {
return !!(this.expanded || this.isPage) return !!(this.expanded || this.isPage)
}, },
hiddenStyle() { hiddenStyle() {
if (this.isExpanded || !this.virtualHidden) return {}
return { height: this.virtualHeight + 'px' } return { height: this.virtualHeight + 'px' }
}, },
threadDisplayStatus() { threadDisplayStatus() {
@ -621,6 +620,7 @@ const conversation = {
} }
}, },
updateVirtualHeight() { updateVirtualHeight() {
if (this.hide) return // no updates when not rendering
this.$nextTick(() => { this.$nextTick(() => {
this.virtualHeight = this.$refs.body.getBoundingClientRect().height this.virtualHeight = this.$refs.body.getBoundingClientRect().height
this.$emit('update:virtualHeight', { this.$emit('update:virtualHeight', {

View file

@ -1,7 +1,6 @@
<template> <template>
<div <div
v-if="!hideStatus" v-if="!hide"
:style="hiddenStyle"
class="Conversation" class="Conversation"
:class="{ '-expanded' : isExpanded, 'panel' : isExpanded }" :class="{ '-expanded' : isExpanded, 'panel' : isExpanded }"
> >

View file

@ -128,7 +128,6 @@ const Status = {
return { return {
replying: false, replying: false,
unmuted: false, unmuted: false,
userExpanded: false,
mediaPlaying: new Set(), mediaPlaying: new Set(),
error: null, error: null,
headTailLinks: null, headTailLinks: null,
@ -524,9 +523,6 @@ const Status = {
toggleMute() { toggleMute() {
this.unmuted = !this.unmuted this.unmuted = !this.unmuted
}, },
toggleUserExpanded() {
this.userExpanded = !this.userExpanded
},
generateUserProfileLink(id, name) { generateUserProfileLink(id, name) {
return generateProfileLink( return generateProfileLink(
id, id,
@ -576,6 +572,12 @@ const Status = {
this.$emit('heightChange') this.$emit('heightChange')
}, },
}, },
unmuted() {
this.$emit('heightChange')
},
error() {
this.$emit('heightChange')
},
replying() { replying() {
this.$emit('heightChange') this.$emit('heightChange')
}, },
@ -604,7 +606,6 @@ const Status = {
}, },
isSuspendable: function (suspend) { isSuspendable: function (suspend) {
this.$emit('suspendableStateChange', { id: this.status.id, suspend }) this.$emit('suspendableStateChange', { id: this.status.id, suspend })
this.$emit('heightChange')
}, },
}, },
} }

View file

@ -549,6 +549,7 @@
@posted="closeReplyForm" @posted="closeReplyForm"
@draft-done="closeReplyForm" @draft-done="closeReplyForm"
@close-accepted="closeReplyForm" @close-accepted="closeReplyForm"
@resize="$emit('heightChange')"
/> />
</div> </div>
</template> </template>