mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-18 16:25:27 +02:00
Rotate PagedIsland
This commit is contained in:
parent
263a1139dc
commit
e5696173f4
@ -74,10 +74,13 @@ fun PagedIsland(
|
||||
.clip(RoundedCornerShape(32.dp))
|
||||
.clickable {
|
||||
onClick()
|
||||
if (pagerState.currentPage == (pagerState.pageCount - 1)) return@clickable
|
||||
val targetPage = pagerState.currentPage + 1
|
||||
|
||||
corScope.launch {
|
||||
pagerState.animateScrollToPage(pagerState.currentPage + 1)
|
||||
pagerState.animateScrollToPage(
|
||||
// Animate to first page if target page is out of bounds
|
||||
if (targetPage >= pagerState.pageCount) 0 else targetPage
|
||||
)
|
||||
}
|
||||
}
|
||||
.background(backgroundColor)
|
||||
|
Loading…
x
Reference in New Issue
Block a user