Dmitry Tavpeko
Dmitry Tavpeko
I'm using `targetPage` to load data on pages as the user scrolls, which is perfect for this use case. Example: ``` LaunchedEffect(pagerState) { snapshotFlow { pagerState.targetPage }.collect { targetPageIndex ->...
I would say `animationTargetPage` and `flingAnimationTarget` are more important than [the logic in "when"](https://github.com/google/accompanist/blob/f619020174239f49e1ae7c2907a0a8f4f1eb986d/pager/src/main/java/com/google/accompanist/pager/PagerState.kt#L168). Here's a demo of the proposed solution: ``` val PagerState.newTargetPage: Int get() = when { //...
You are right, thanks for pointing this out. As for scrollingDirection, I would implement it this way (just a prototype): ``` enum class ScrollingDirection { Backward, Forward } private const...
> @dmitrytavpeko I meant something like this: > > ``` > @ExperimentalPagerApi > @Composable > fun PagerState.scrollDirection(): State { > return produceState(initialValue = ScrollingDirection.Backward) { > var lastPosition = currentPage...
What you are observing is the intendent behaviour. Pager is built on top of the LazyRow/LazyColumn. LazyRow/LazyColumn do not support this feature yet. I think the offscreenPageLimit is what you...
As far as I know, the BringIntoView is responsible for scrolling to focused composables, the Pager has nothing to do with it. I didn't find a way to turn it...
Great job, thanks! I don't observe `kotlinx.coroutines.channels.ClosedReceiveChannelException: Channel was closed` errors anymore that prevented from reinstating my subscriptions! While migrating to the new implementation, I encountered these issues: 1. API...
@martinbonnin Thank you for the quick response!