From 69601d823f9d57631cf2236e82d4f10113a648f4 Mon Sep 17 00:00:00 2001 From: Daniel Frett Date: Wed, 10 Jul 2024 11:16:03 -0600 Subject: [PATCH] replace rememberRipple() with ripple() --- app/config/ktlint/baseline.xml | 2 +- .../ui/languages/downloadable/DownloadableLanguagesLayout.kt | 5 ++--- .../org/cru/godtools/ui/tooldetails/ToolDetailsAbout.kt | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/config/ktlint/baseline.xml b/app/config/ktlint/baseline.xml index 8e79e16298..f3b331f2d9 100644 --- a/app/config/ktlint/baseline.xml +++ b/app/config/ktlint/baseline.xml @@ -19,7 +19,7 @@ - + diff --git a/app/src/main/kotlin/org/cru/godtools/ui/languages/downloadable/DownloadableLanguagesLayout.kt b/app/src/main/kotlin/org/cru/godtools/ui/languages/downloadable/DownloadableLanguagesLayout.kt index ddd86fee47..f3ed77feb6 100644 --- a/app/src/main/kotlin/org/cru/godtools/ui/languages/downloadable/DownloadableLanguagesLayout.kt +++ b/app/src/main/kotlin/org/cru/godtools/ui/languages/downloadable/DownloadableLanguagesLayout.kt @@ -13,7 +13,6 @@ import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material.icons.filled.Close -import androidx.compose.material.ripple.rememberRipple import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon @@ -22,6 +21,7 @@ import androidx.compose.material3.ListItem import androidx.compose.material3.Scaffold import androidx.compose.material3.SearchBar import androidx.compose.material3.Text +import androidx.compose.material3.ripple import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.collectAsState @@ -36,7 +36,6 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.testTag import androidx.compose.ui.res.pluralStringResource import androidx.compose.ui.res.stringResource -import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import androidx.lifecycle.viewmodel.compose.viewModel import kotlinx.coroutines.NonCancellable @@ -152,7 +151,7 @@ private fun LanguageListItem(viewModel: LanguageViewModels.LanguageViewModel, mo modifier = Modifier .clickable( interactionSource = remember { MutableInteractionSource() }, - indication = rememberRipple(bounded = false, radius = Dp.Unspecified), + indication = ripple(bounded = false), ) { when { !language.isAdded -> scope.launch(NonCancellable) { viewModel.pin() } diff --git a/app/src/main/kotlin/org/cru/godtools/ui/tooldetails/ToolDetailsAbout.kt b/app/src/main/kotlin/org/cru/godtools/ui/tooldetails/ToolDetailsAbout.kt index 153be37aad..1afb72e43c 100644 --- a/app/src/main/kotlin/org/cru/godtools/ui/tooldetails/ToolDetailsAbout.kt +++ b/app/src/main/kotlin/org/cru/godtools/ui/tooldetails/ToolDetailsAbout.kt @@ -14,13 +14,13 @@ import androidx.compose.foundation.layout.height import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Add import androidx.compose.material.icons.filled.Remove -import androidx.compose.material.ripple.rememberRipple import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.LocalTextStyle import androidx.compose.material3.MaterialTheme import androidx.compose.material3.ProvideTextStyle import androidx.compose.material3.Text +import androidx.compose.material3.ripple import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.derivedStateOf @@ -174,7 +174,7 @@ private fun ToolDetailsAboutAccordionSection( Icon( if (expanded) Icons.Filled.Remove else Icons.Filled.Add, contentDescription = null, - modifier = Modifier.indication(headerInteractions, rememberRipple(bounded = false, radius = 20.dp)) + modifier = Modifier.indication(headerInteractions, ripple(bounded = false, radius = 20.dp)) ) } AnimatedVisibility(visible = expanded) {