File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
app/src/main/java/to/bitkit/ui/onboarding Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ import to.bitkit.ui.theme.Colors
5151import to.bitkit.ui.utils.withAccent
5252
5353private const val LAST_PAGE_INDEX = 3
54+ private const val PAGE_COUNT = LAST_PAGE_INDEX + 1
5455
5556@Composable
5657fun OnboardingSlidesScreen (
@@ -61,7 +62,7 @@ fun OnboardingSlidesScreen(
6162 onRestoreClick : () -> Unit ,
6263) {
6364 val scope = rememberCoroutineScope()
64- val pagerState = rememberPagerState(initialPage = currentTab, pageCount = { 5 })
65+ val pagerState = rememberPagerState(initialPage = currentTab, pageCount = { PAGE_COUNT })
6566
6667 Box (
6768 modifier = Modifier
@@ -129,7 +130,7 @@ fun OnboardingSlidesScreen(
129130 .offset { IntOffset (0 , yOffset.roundToPx()) }
130131 .alpha(alpha)
131132 ) {
132- repeat(LAST_PAGE_INDEX + 1 ) { index ->
133+ repeat(PAGE_COUNT ) { index ->
133134 val size by animateDpAsState(
134135 targetValue = if (index == pagerState.currentPage) 10 .dp else 7 .dp,
135136 animationSpec = tween(durationMillis = 300 ),
You can’t perform that action at this time.
0 commit comments