From 200d304190c3bca5bc743fe342c8dc70d6a5c3c9 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Fri, 11 Sep 2026 03:17:05 +0300 Subject: [PATCH] unlike composition api, refs are not reactive in options api --- src/components/conversation/conversation.vue | 3 +++ src/components/status/status.js | 9 +++++++-- src/components/timeline/timeline.vue | 4 ++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue index abfd57d48..1c0d459f3 100644 --- a/src/components/conversation/conversation.vue +++ b/src/components/conversation/conversation.vue @@ -153,6 +153,9 @@ :focused="focused === element.id || focused === element.item.retweeted_status?.id" :data-status-id="element.id" + :data-vs-height="element.height" + :data-vs-top="element.top" + @goto="setFocused" @toggle-expanded="toggleExpanded" @suspendable-state-change="changeSuspendStateLinearLocal" diff --git a/src/components/status/status.js b/src/components/status/status.js index 6ef799dca..277421c6e 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -597,12 +597,17 @@ const Status = { }) }, }, + mounted() { + if (this.$refs.root) { + this.resizeObserver.observe(this.$refs.root) + } + }, unmounted() { this.resizeObserver.disconnect() }, watch: { - '$refs.root': function (element) { - if (element) { + hideStatus: function (element) { + if (this.$refs.root) { this.resizeObserver.observe(this.$refs.root) } else { this.resizeObserver.disconnect() diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue index 88cfdf066..8ad3521cd 100644 --- a/src/components/timeline/timeline.vue +++ b/src/components/timeline/timeline.vue @@ -90,6 +90,10 @@ v-if="element.type === 'item'" :status-id="element.item.id" role="listitem" + + :data-vs-height="element.height" + :data-vs-top="element.top" + @suspendable-state-change="changeSuspendState" @height-change="updateVirtualHeight" />