Is it normal that `NestedScrollConnection` is not ...
# compose
t
Is it normal that
NestedScrollConnection
is not called at all when `listState.scrollToItem`is called manually?
a
Yes. Nested scroll is only triggered for user interaction.
t
Hum 😞 So what would be the proper way to calculate the offset to manually call the listener ? (Like for a collapsible toolbar and draggable scroll bar working together properly)
a
You don't need to. App bars don't react to programmatic scrolls.
t
This was an example. I have added a draggable scroll bar to the lazy list. When user scroll manually I have a component that offset to be visible or not. The component should go back to visible when the user fastscroll up and hide when down. Dragging a scroll bar is user scrolling. Since lazycolumn does not support that we need to many scroll from code. So yes it's needed for a few uses cases. For large list I can just detect direction and animate for small list not being synchronized as when manually scrolling looks not natural.
s
Yes. Nested scroll is only triggered for user interaction.
I don’t believe this is the same behavior in traditional Views so this sounds like a bug to me. @Tolriq wanna file a bug report?
t
Opened https://issuetracker.google.com/issues/203855802 but there's currently not really any triaging on compose tracker for now 😞
👍 1