This commit is contained in:
Henry Jameson 2026-09-15 01:07:56 +03:00
commit 5d1f3c1cee
4 changed files with 7 additions and 4 deletions

View file

@ -187,7 +187,7 @@ export default {
// # Linear style stuff
const isLinearView = computed(() => displayStyle.value !== 'tree')
const linearElement = useTemplateRef('linear')
const linearScrollCompensation = computed(() => isLinearView.value)
const linearScrollCompensation = computed(() => isExpanded.value && isLinearView.value)
const {
heightChart: heightChartLinear,
changeSuspendState: changeSuspendStateLinear,
@ -233,7 +233,7 @@ export default {
const currentAncestorsLite = computed(() => currentAncestors.value.map(({ id }) => ({ id })))
const ancestorsElement = useTemplateRef('ancestors')
const treeScrollCompensation = computed(() => isTreeView.value)
const treeScrollCompensation = computed(() => isExpanded.value && isTreeView.value)
const {
heightChart: heightChartAncestors,
changeSuspendState: changeSuspendStateAncestors,

View file

@ -88,7 +88,7 @@
>
<Conversation
v-if="element.type === 'item'"
:status-id="element.item.id"
:status-id="element.id"
role="listitem"
:data-vs-height="element.height"

View file

@ -37,7 +37,9 @@ export function useConversation(statusId, expanded) {
watch(mainStatus, (newStatus, oldStatus) => {
if (newStatus) setFocused(newStatus.id)
fetchConversation()
if (newStatus.id !== oldStatus.id) {
fetchConversation()
}
})
watch(expanded, (value) => {

View file

@ -176,6 +176,7 @@ export function useVirtualScrolling({
console.log('COMPENSATE', oldVal, newVal, topScrollBoundary.value)
const oldVisible = oldVal.filter((item) => checkVisible(item))
const oldItem = first(oldVisible)
if (!oldItem) return 0 // probably out of bounds in timeline
const oldItemUpdated = newVal.find(({ id }) => id === oldItem.id)
console.log('OLD', oldItem, oldItemUpdated)
if (!oldItemUpdated) return 0 // context change?