Hi. Have any faced this issue? I have a LazyColumn where items are HorizontalPagers. When I swipe on my item multiple pages are being changed.
Here is my code
This is happening due to recomposition. Don't use if condition directly, Try to use LauchEffect instead.
f
Fyodor Danilov
06/19/2024, 10:05 AM
But I can't call composables from LaunchedEffect. The problem is not with pages recomposition but with HorizontalPager's frequent changing pages. In one swipe I change around 10 pages, even though HorizontalPager's maximumPages swipe is 1.
Fyodor Danilov
06/19/2024, 10:07 AM
I managed to fix this. Instead of Int.MAX_VALUE I used a constant page count less than 1000.
l
Lukas Anda
06/19/2024, 11:09 AM
yes, actually from Compose 1.6 onwards, passing Int.MAX_VALUE or any large number for that matter to