Kaynağa Gözat

swipe gestures for big carousel & gallery

Milan Jurkulak 3 yıl önce
ebeveyn
işleme
1096be61da

+ 1 - 1
tvlib/src/main/kotlin/org/mjdev/tvlib/ui/components/carousel/BigCarousel.kt

@@ -60,7 +60,7 @@ fun BigCarousel(
                     detectSwipe(
                     detectSwipe(
                         onSwipeLeft = {
                         onSwipeLeft = {
                             val nextItem = carouselState.value.activeItemIndex + 1
                             val nextItem = carouselState.value.activeItemIndex + 1
-                            if (nextItem <= items.size) {
+                            if (nextItem < items.size) {
                                 carouselState.value = CarouselState(nextItem).apply {
                                 carouselState.value = CarouselState(nextItem).apply {
                                     pauseAutoScroll(nextItem)
                                     pauseAutoScroll(nextItem)
                                 }
                                 }