fixes
This commit is contained in:
parent
05824010ed
commit
5d1f3c1cee
4 changed files with 7 additions and 4 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
if (newStatus.id !== oldStatus.id) {
|
||||||
fetchConversation()
|
fetchConversation()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(expanded, (value) => {
|
watch(expanded, (value) => {
|
||||||
|
|
|
||||||
|
|
@ -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?
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue