Skip to content

Commit

Permalink
Fix order of columnState param
Browse files Browse the repository at this point in the history
  • Loading branch information
luizgrp committed Dec 13, 2022
1 parent ca310f7 commit 1c00b47
Show file tree
Hide file tree
Showing 18 changed files with 34 additions and 35 deletions.
2 changes: 1 addition & 1 deletion auth-ui/api/current.api
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package com.google.android.horologist.auth.ui.common.screens {
}

public final class SignInPromptScreenKt {
method @androidx.compose.runtime.Composable @com.google.android.horologist.auth.ui.ExperimentalHorologistAuthUiApi public static void SignInPromptScreen(String message, kotlin.jvm.functions.Function0<kotlin.Unit> onAlreadySignedIn, optional androidx.compose.ui.Modifier modifier, optional String title, optional com.google.android.horologist.auth.ui.common.screens.SignInPromptViewModel viewModel, com.google.android.horologist.compose.layout.ScalingLazyColumnState columnState, kotlin.jvm.functions.Function1<? super androidx.wear.compose.material.ScalingLazyListScope,kotlin.Unit> content);
method @androidx.compose.runtime.Composable @com.google.android.horologist.auth.ui.ExperimentalHorologistAuthUiApi public static void SignInPromptScreen(String message, kotlin.jvm.functions.Function0<kotlin.Unit> onAlreadySignedIn, com.google.android.horologist.compose.layout.ScalingLazyColumnState columnState, optional androidx.compose.ui.Modifier modifier, optional String title, optional com.google.android.horologist.auth.ui.common.screens.SignInPromptViewModel viewModel, kotlin.jvm.functions.Function1<? super androidx.wear.compose.material.ScalingLazyListScope,kotlin.Unit> content);
}

@com.google.android.horologist.auth.ui.ExperimentalHorologistAuthUiApi public abstract sealed class SignInPromptScreenState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ import com.google.android.horologist.compose.layout.ScalingLazyColumnState
public fun SignInPromptScreen(
message: String,
onAlreadySignedIn: () -> Unit,
columnState: ScalingLazyColumnState,
modifier: Modifier = Modifier,
title: String = stringResource(id = R.string.horologist_signin_prompt_title),
viewModel: SignInPromptViewModel = viewModel(),
columnState: ScalingLazyColumnState,
content: ScalingLazyListScope.() -> Unit
) {
val state by viewModel.uiState.collectAsStateWithLifecycle()
Expand Down Expand Up @@ -76,8 +76,8 @@ public fun SignInPromptScreen(

SignInPromptScreenState.SignedOut -> {
ScalingLazyColumn(
modifier = modifier,
columnState = columnState
columnState = columnState,
modifier = modifier
) {
item { Title(text = title) }
item {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ public fun SectionedList(
sections: List<Section<*>> = emptyList()
) {
ScalingLazyColumn(
columnState = columnState,
modifier = modifier
.fillMaxSize(),
columnState = columnState
.fillMaxSize()
) {
sections.forEach { section ->
section.display(this)
Expand Down
2 changes: 1 addition & 1 deletion compose-layout/api/current.api
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ package com.google.android.horologist.compose.layout {
}

public final class ScalingLazyColumnStateKt {
method @androidx.compose.runtime.Composable public static void ScalingLazyColumn(optional androidx.compose.ui.Modifier modifier, com.google.android.horologist.compose.layout.ScalingLazyColumnState columnState, kotlin.jvm.functions.Function1<? super androidx.wear.compose.material.ScalingLazyListScope,kotlin.Unit> content);
method @androidx.compose.runtime.Composable public static void ScalingLazyColumn(com.google.android.horologist.compose.layout.ScalingLazyColumnState columnState, optional androidx.compose.ui.Modifier modifier, kotlin.jvm.functions.Function1<? super androidx.wear.compose.material.ScalingLazyListScope,kotlin.Unit> content);
}

public final class ScrollAwayKt {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ class NavScaffoldTest {
route = "a"
) {
ScalingLazyColumn(
modifier = Modifier.testTag("columna"),
columnState = it.columnState
columnState = it.columnState,
modifier = Modifier.testTag("columna")
) {
items(100) {
Text("Item $it")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ public class ScalingLazyColumnState(

@Composable
public fun ScalingLazyColumn(
modifier: Modifier = Modifier,
columnState: ScalingLazyColumnState,
modifier: Modifier = Modifier,
content: ScalingLazyListScope.() -> Unit
) {
val focusRequester = rememberActiveFocusRequester()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ fun AudioDebugScreen(
val uiState by audioDebugScreenViewModel.uiState.collectAsStateWithLifecycle()

ScalingLazyColumn(
columnState = columnState,
modifier = modifier
.fillMaxSize(),
columnState = columnState
.fillMaxSize()
) {
item {
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ fun SamplesScreen(
val uiState by samplesScreenViewModel.uiState.collectAsStateWithLifecycle()

ScalingLazyColumn(
columnState = columnState,
modifier = modifier
.fillMaxSize(),
columnState = columnState
.fillMaxSize()
) {
item {
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ fun DeveloperOptionsScreen(
val uiState by developerOptionsScreenViewModel.uiState.collectAsStateWithLifecycle()

ScalingLazyColumn(
columnState = columnState,
modifier = modifier
.fillMaxSize(),
columnState = columnState
.fillMaxSize()
) {
item {
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ fun UampSettingsScreen(
modifier: Modifier = Modifier
) {
ScalingLazyColumn(
columnState = columnState,
modifier = modifier
.fillMaxSize(),
columnState = columnState
.fillMaxSize()
) {
item {
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public fun EntityScreen(
content: (ScalingLazyListScope.() -> Unit)? = null
) {
ScalingLazyColumn(
columnState = columnState,
modifier = modifier
.fillMaxSize(),
columnState = columnState
.fillMaxSize()
) {
item {
headerContent()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ fun GoogleSignInPromptSampleScreen(
SignInPromptScreen(
message = stringResource(id = R.string.google_sign_in_prompt_message),
onAlreadySignedIn = { navController.popBackStack() },
columnState = columnState,
modifier = modifier,
viewModel = viewModel,
columnState = columnState
viewModel = viewModel
) {
item {
SignInChip(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ fun AuthDeviceGrantSignInPromptScreen(
SignInPromptScreen(
message = stringResource(id = R.string.auth_device_grant_sign_in_prompt_message),
onAlreadySignedIn = { navController.popBackStack() },
columnState = columnState,
modifier = modifier,
viewModel = viewModel,
columnState = columnState
viewModel = viewModel
) {
item {
SignInChip(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ fun AuthPKCESignInPromptScreen(
SignInPromptScreen(
message = stringResource(id = R.string.auth_pkce_sign_in_prompt_message),
onAlreadySignedIn = { navController.popBackStack() },
columnState = columnState,
modifier = modifier,
viewModel = viewModel,
columnState = columnState
viewModel = viewModel
) {
item {
SignInChip(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import androidx.wear.compose.material.Button
import androidx.wear.compose.material.Chip
import androidx.wear.compose.material.ListHeader
import androidx.wear.compose.material.Text
import androidx.wear.compose.material.items
import com.google.android.horologist.compose.layout.ScalingLazyColumn
import com.google.android.horologist.compose.layout.ScalingLazyColumnState

Expand All @@ -37,8 +36,8 @@ fun DataLayerNodesScreen(
val state by viewModel.state.collectAsStateWithLifecycle()

ScalingLazyColumn(
modifier = modifier,
columnState = columnState
columnState = columnState,
modifier = modifier
) {
item {
ListHeader {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ fun NetworkScreen(
val uiState by viewModel.state.collectAsStateWithLifecycle()

ScalingLazyColumn(
modifier = Modifier.fillMaxSize(),
columnState = columnState
columnState = columnState,
modifier = Modifier.fillMaxSize()
) {
item {
Chip(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ fun PagingScreen(
val lazyPagingItems = pager.flow.collectAsLazyPagingItems()

ScalingLazyColumn(
modifier = modifier,
columnState = columnState
columnState = columnState,
modifier = modifier
) {
if (lazyPagingItems.loadState.refresh == LoadState.Loading) {
items(10) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ fun MenuScreen(
columnState: ScalingLazyColumnState
) {
ScalingLazyColumn(
modifier = modifier,
columnState = columnState
columnState = columnState,
modifier = modifier
) {
item {
ListHeader {
Expand Down

0 comments on commit 1c00b47

Please sign in to comment.