even more shenanigans

This commit is contained in:
Henry Jameson 2026-09-09 19:01:48 +03:00
commit 5bd9a44c2c
2 changed files with 4 additions and 3 deletions

View file

@ -151,10 +151,11 @@ export default {
watch(expanded, async (value) => { watch(expanded, async (value) => {
if (value) { if (value) {
await fetchConversation() await fetchConversation()
await tryScrollTo(currentStatus.value.id)
} else { } else {
resetDisplayState() resetDisplayState()
} }
if (isPage.value) return
await tryScrollTo(currentStatus.value.id)
}, { flush: 'post' }) }, { flush: 'post' })
const resetDisplayState = () => { const resetDisplayState = () => {

View file

@ -130,7 +130,7 @@ export function useVirtualScrolling(
}) })
watch(heightChart, async (newVal, oldVal) => { watch(heightChart, async (newVal, oldVal) => {
if (scrollInProgress) return if (scrollInProgress.value) return
if (!scrollCompensation) return if (!scrollCompensation) return
pauseWatchers() pauseWatchers()
const getAnchoredEl = (list) => anchor.value const getAnchoredEl = (list) => anchor.value
@ -146,7 +146,7 @@ export function useVirtualScrolling(
topScrollBoundary.value += diff topScrollBoundary.value += diff
bottomScrollBoundary.value += diff bottomScrollBoundary.value += diff
await nextTick() await nextTick()
window.scrollBy(0, diff) scrollPosition.scrollBy(0, diff)
updateBoundaries() updateBoundaries()
resumeWatchers() resumeWatchers()