I'm using HorizontalPager and listening to page updates as per the docs. This works well, but I also get notified when I programatically scroll. Is there a way to only listen to updates made by a user and not programatically? I saw the pager docs have something called Interaction source, but I couldn't figure out if its actually meant for my situation (docs dont really lead me to believe that it should be used for my case). Any suggestions?
05/31/2022, 5:27 AM
Can you describe the use case a bit more? Wanting to know the source of a state change like this can often indicate some lurking source of truth questions in the data flow
05/31/2022, 6:03 AM
Tangentially, I found there were some surprising behaviours when I used programmatic scroll with Pager. Main one I remember is the single animation restriction, so needed to catch an exception on animateScrollToPage, and drop back to scrollToPage.
05/31/2022, 2:29 PM
On scroll of my pager (by a user) I want to perform an action. And thats easy to do via the docs, but in some cases I also programatically scroll my pager, and therefore my action gets called too, but I don't want that action to be called programatically.
I actually found this github issues... https://github.com/google/accompanist/issues/651 but I don't know how to actually use the api to just filter for user has paged event.