From 8886acc248b33fb12207b63ebb4c47ef671ba166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Rayapoull=C3=A9?= Date: Wed, 2 Oct 2024 18:13:09 +0200 Subject: [PATCH] Fixes for compose 1.7 --- .../spark/catalog/examples/samples/icons/IconsExamples.kt | 4 ++-- .../kotlin/com/adevinta/spark/catalog/icons/IconsScreen.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/catalog/src/main/kotlin/com/adevinta/spark/catalog/examples/samples/icons/IconsExamples.kt b/catalog/src/main/kotlin/com/adevinta/spark/catalog/examples/samples/icons/IconsExamples.kt index 3bdbe7b56..ddb8de02b 100644 --- a/catalog/src/main/kotlin/com/adevinta/spark/catalog/examples/samples/icons/IconsExamples.kt +++ b/catalog/src/main/kotlin/com/adevinta/spark/catalog/examples/samples/icons/IconsExamples.kt @@ -34,7 +34,6 @@ import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.foundation.selection.selectable import androidx.compose.foundation.selection.selectableGroup -import androidx.compose.material.ripple.rememberRipple import androidx.compose.material3.LocalContentColor import androidx.compose.material3.LocalTextStyle import androidx.compose.material3.NavigationBarDefaults @@ -73,6 +72,7 @@ import com.adevinta.spark.icons.SearchToOutline import com.adevinta.spark.icons.SparkAnimatedIcons import com.adevinta.spark.tokens.disabled import com.adevinta.spark.tokens.highlight +import com.adevinta.spark.tokens.ripple import kotlin.math.roundToInt private const val IconsExampleSourceUrl = "$SampleSourceUrl/IconsSamples.kt" @@ -257,7 +257,7 @@ public fun RowScope.NavigationBarItem( // The color of the Ripple should always the selected color, as we want to show the color // before the item is considered selected, and hence before the new contentColor is // provided by BottomNavigationTransition. - val ripple = rememberRipple(bounded = false, color = SparkTheme.colors.neutral) + val ripple = ripple(bounded = false, color = SparkTheme.colors.neutral) Box( modifier diff --git a/catalog/src/main/kotlin/com/adevinta/spark/catalog/icons/IconsScreen.kt b/catalog/src/main/kotlin/com/adevinta/spark/catalog/icons/IconsScreen.kt index 2db109674..c1ff75fa4 100644 --- a/catalog/src/main/kotlin/com/adevinta/spark/catalog/icons/IconsScreen.kt +++ b/catalog/src/main/kotlin/com/adevinta/spark/catalog/icons/IconsScreen.kt @@ -194,7 +194,7 @@ public fun IconsScreen( }, ) .padding(8.dp) - .animateItemPlacement(), + .animateItem(), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(4.dp), ) {