Fix detekted issues.

This commit is contained in:
Benoit Marty 2022-12-12 16:32:33 +01:00 committed by Benoit Marty
parent 9c7fa85897
commit dfdcebf7af
2 changed files with 10 additions and 5 deletions

View file

@ -58,14 +58,16 @@ fun OnBoardingScreen(
@Composable
fun OnBoardingContent(
state: OnBoardingViewState,
onPageChanged: (Int) -> Unit,
onSignUp: () -> Unit,
onSignIn: () -> Unit,
modifier: Modifier = Modifier,
onPageChanged: (Int) -> Unit = {},
onSignUp: () -> Unit = {},
onSignIn: () -> Unit = {},
) {
val carrouselState = remember { SplashCarouselStateFactory().create() }
val nbOfPages = carrouselState.items.size
var key by remember { mutableStateOf(false) }
Surface(
modifier = modifier,
color = MaterialTheme.colorScheme.background,
) {
Box(
@ -136,8 +138,11 @@ fun OnBoardingContent(
@Composable
fun OnBoardingPage(
item: SplashCarouselState.Item,
modifier: Modifier = Modifier,
) {
Box {
Box(
modifier = modifier,
) {
/*
Image(
painterResource(id = item.pageBackground),

View file

@ -3,7 +3,7 @@ package io.element.android.x.features.onboarding
import androidx.annotation.DrawableRes
import io.element.android.x.element.resources.R as ElementR
class SplashCarouselStateFactory() {
class SplashCarouselStateFactory {
fun create(): SplashCarouselState {
val lightTheme = true
fun background(@DrawableRes lightDrawable: Int) =