Fix detekted issues.
This commit is contained in:
parent
9c7fa85897
commit
dfdcebf7af
2 changed files with 10 additions and 5 deletions
|
|
@ -58,14 +58,16 @@ fun OnBoardingScreen(
|
||||||
@Composable
|
@Composable
|
||||||
fun OnBoardingContent(
|
fun OnBoardingContent(
|
||||||
state: OnBoardingViewState,
|
state: OnBoardingViewState,
|
||||||
onPageChanged: (Int) -> Unit,
|
modifier: Modifier = Modifier,
|
||||||
onSignUp: () -> Unit,
|
onPageChanged: (Int) -> Unit = {},
|
||||||
onSignIn: () -> Unit,
|
onSignUp: () -> Unit = {},
|
||||||
|
onSignIn: () -> Unit = {},
|
||||||
) {
|
) {
|
||||||
val carrouselState = remember { SplashCarouselStateFactory().create() }
|
val carrouselState = remember { SplashCarouselStateFactory().create() }
|
||||||
val nbOfPages = carrouselState.items.size
|
val nbOfPages = carrouselState.items.size
|
||||||
var key by remember { mutableStateOf(false) }
|
var key by remember { mutableStateOf(false) }
|
||||||
Surface(
|
Surface(
|
||||||
|
modifier = modifier,
|
||||||
color = MaterialTheme.colorScheme.background,
|
color = MaterialTheme.colorScheme.background,
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
|
|
@ -136,8 +138,11 @@ fun OnBoardingContent(
|
||||||
@Composable
|
@Composable
|
||||||
fun OnBoardingPage(
|
fun OnBoardingPage(
|
||||||
item: SplashCarouselState.Item,
|
item: SplashCarouselState.Item,
|
||||||
|
modifier: Modifier = Modifier,
|
||||||
) {
|
) {
|
||||||
Box {
|
Box(
|
||||||
|
modifier = modifier,
|
||||||
|
) {
|
||||||
/*
|
/*
|
||||||
Image(
|
Image(
|
||||||
painterResource(id = item.pageBackground),
|
painterResource(id = item.pageBackground),
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ package io.element.android.x.features.onboarding
|
||||||
import androidx.annotation.DrawableRes
|
import androidx.annotation.DrawableRes
|
||||||
import io.element.android.x.element.resources.R as ElementR
|
import io.element.android.x.element.resources.R as ElementR
|
||||||
|
|
||||||
class SplashCarouselStateFactory() {
|
class SplashCarouselStateFactory {
|
||||||
fun create(): SplashCarouselState {
|
fun create(): SplashCarouselState {
|
||||||
val lightTheme = true
|
val lightTheme = true
|
||||||
fun background(@DrawableRes lightDrawable: Int) =
|
fun background(@DrawableRes lightDrawable: Int) =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue