Hello! Im having some issue with accompanist pager...
# compose
m
Hello! Im having some issue with accompanist pager when updating compose and maybe someone could share some insight 🙂. Info in the 🧵
As mentioned I updated compose and accompanist ( latter from 0.18 to 0.24. If am not mistaken pager was rewritten/refactored so use lazy layouts). There is a flow of the app where after fetching info from an api. Screen state is updated (with new content that generate new tabs) and immediately a request to go to the next tab is dispatched ( translate in pagerState.animateScrollTopage) This works correctly when using the app, but an existing UI test fails with the following message
IllegalArgumentException page must be >= 0 and < pageCount
So apparently (on the test) pagerSate’s pageCount its not being updated fast enough. Im trying to understand if this is indeed correct ( since the lazylaout adoption and pager state no longer having page count property) or if hopefully Im missing something. Sorry if the question is too abstract but any insight could help. Cheers!
PS: the “action” to go to next tab is consumed as compose state as well, not channles or similar
a
please file a bug in the accompanist github, thanks
m
Emm, ok I guess..Ill try to setup a project to reproduce and will file one ( If I manage to reliable reproduce as this is only happening on a ui test atm)