Skip to content

Commit

Permalink
Hide skip after first page.
Browse files Browse the repository at this point in the history
  • Loading branch information
pcraciunoiu committed May 23, 2024
1 parent 176f1f0 commit e140ca6
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ private fun StudyOnboardingScreenContent(

OnboardingStepContent(
onboardingStep = stepInfo,
page = page,
modifier = Modifier.fillMaxSize(),
nextButton = {
PrimaryButton(
Expand Down Expand Up @@ -208,6 +209,7 @@ private fun OnboardingStepContent(
backButton: (@Composable () -> Unit)? = null,
skipButton: (@Composable () -> Unit)? = null,
hasBackButton: Boolean = false,
page: Int = 0,
) {
Column(
modifier = modifier
Expand Down Expand Up @@ -238,6 +240,7 @@ private fun OnboardingStepContent(
backButton = backButton,
skipButton = skipButton,
hasBackButton = hasBackButton,
page = page,
)
}
}
Expand Down Expand Up @@ -363,6 +366,7 @@ private fun OnboardingStepButtons(
backButton: (@Composable () -> Unit)? = null,
skipButton: (@Composable () -> Unit)? = null,
hasBackButton: Boolean = false,
page: Int = 0,
) {
Column(
modifier = modifier
Expand All @@ -386,6 +390,8 @@ private fun OnboardingStepButtons(
nextButton?.let { it() }
backButton?.let { it() }
}
skipButton?.let { it() }
if (page == 0) {
skipButton?.let { it() }
}
}
}

0 comments on commit e140ca6

Please sign in to comment.