From 587de8127cb6bdd86586441394934a78da122be3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 16:40:59 +0000 Subject: [PATCH] Update dependency io.nlopez.compose.rules:ktlint to v0.4.16 (#516) * Update dependency io.nlopez.compose.rules:ktlint to v0.4.16 * Do not use trailing event lambda --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jake Wharton --- gradle/libs.versions.toml | 2 +- .../main/java/com/example/molecule/viewmodel/MainActivity.kt | 2 +- .../src/main/java/com/example/molecule/viewmodel/ui.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 0486eae6..49cb49fb 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -36,7 +36,7 @@ kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-t kotlinx-binaryCompatibilityValidator = "org.jetbrains.kotlinx:binary-compatibility-validator:0.16.3" ktlint-core = "com.pinterest.ktlint:ktlint-cli:1.3.1" -ktlint-composeRules = "io.nlopez.compose.rules:ktlint:0.4.12" +ktlint-composeRules = "io.nlopez.compose.rules:ktlint:0.4.16" maven-publish-plugin = { module = "com.vanniktech:gradle-maven-publish-plugin", version = "0.30.0" } diff --git a/sample-viewmodel/src/main/java/com/example/molecule/viewmodel/MainActivity.kt b/sample-viewmodel/src/main/java/com/example/molecule/viewmodel/MainActivity.kt index 8ea36f9f..6d247361 100644 --- a/sample-viewmodel/src/main/java/com/example/molecule/viewmodel/MainActivity.kt +++ b/sample-viewmodel/src/main/java/com/example/molecule/viewmodel/MainActivity.kt @@ -40,7 +40,7 @@ class MainActivity : ComponentActivity() { setContent { RootContainer { val model by viewModel.models.collectAsState() - PupperPicsScreen(model) { event -> viewModel.take(event) } + PupperPicsScreen(model, onEvent = { event -> viewModel.take(event) }) } } } diff --git a/sample-viewmodel/src/main/java/com/example/molecule/viewmodel/ui.kt b/sample-viewmodel/src/main/java/com/example/molecule/viewmodel/ui.kt index de2d15ad..56c7a9f5 100644 --- a/sample-viewmodel/src/main/java/com/example/molecule/viewmodel/ui.kt +++ b/sample-viewmodel/src/main/java/com/example/molecule/viewmodel/ui.kt @@ -65,7 +65,7 @@ import coil.compose.AsyncImage import coil.compose.AsyncImagePainter @Composable -fun PupperPicsScreen(model: Model, modifier: Modifier = Modifier, onEvent: (Event) -> Unit) { +fun PupperPicsScreen(model: Model, onEvent: (Event) -> Unit, modifier: Modifier = Modifier) { Box( modifier = modifier .fillMaxSize()