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

View file

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

View file

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

View file

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