diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 9efe360e1..0406db62a 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -18,8 +18,8 @@ android { defaultConfig { applicationId = "com.kafka.user" - versionCode = 66 - versionName = "0.26.0" + versionCode = 68 + versionName = "0.28.0" val properties = Properties() properties.load(project.rootProject.file("local.properties").inputStream()) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 1c1ca24a8..2ed36990e 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -116,3 +116,10 @@ -keep class app.rive.runtime.** { *; } -keep class com.shockwave.** + +-if public class androidx.compose.ui.platform.AndroidCompositionLocals_androidKt { + public static *** getLocalLifecycleOwner(); +} +-keep public class androidx.compose.ui.platform.AndroidCompositionLocals_androidKt { + public static *** getLocalLifecycleOwner(); +} diff --git a/app/release/baselineProfiles/0/app-release.dm b/app/release/baselineProfiles/0/app-release.dm index df918ac46..f7279a43d 100644 Binary files a/app/release/baselineProfiles/0/app-release.dm and b/app/release/baselineProfiles/0/app-release.dm differ diff --git a/app/release/baselineProfiles/1/app-release.dm b/app/release/baselineProfiles/1/app-release.dm index b6e7c76ea..8f9b1977e 100644 Binary files a/app/release/baselineProfiles/1/app-release.dm and b/app/release/baselineProfiles/1/app-release.dm differ diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index 0e9d2f3d4..b6b7e09fc 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -11,8 +11,8 @@ "type": "SINGLE", "filters": [], "attributes": [], - "versionCode": 66, - "versionName": "0.26.0", + "versionCode": 68, + "versionName": "0.28.0", "outputFile": "app-release.apk" } ], diff --git a/app/src/main/java/com/kafka/user/home/bottombar/rail/HomeNavigationRailItemRow.kt b/app/src/main/java/com/kafka/user/home/bottombar/rail/HomeNavigationRailItemRow.kt index 2070189f5..6b86f1337 100644 --- a/app/src/main/java/com/kafka/user/home/bottombar/rail/HomeNavigationRailItemRow.kt +++ b/app/src/main/java/com/kafka/user/home/bottombar/rail/HomeNavigationRailItemRow.kt @@ -14,10 +14,10 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.selection.selectable +import androidx.compose.material.ripple.rememberRipple import androidx.compose.material3.LocalContentColor import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text -import androidx.compose.material3.ripple import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.getValue @@ -54,7 +54,7 @@ internal fun HomeNavigationRailItemRow( enabled = enabled, role = Role.Tab, interactionSource = interactionSource, - indication = ripple(bounded = true, color = activeColor) + indication = rememberRipple(bounded = true, color = activeColor) ) .padding(horizontal = Dimens.Spacing40, vertical = Dimens.Spacing20) ) { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 43b65e0a9..3bc283fa0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -12,7 +12,7 @@ dagger = "2.51.1" icons = "1.0.0" kotlin = "2.0.0" kotlin-immutable = "0.3.7" -material3 = "1.3.0-beta03" +material3 = "1.2.1" media3 = "1.3.1" mixpanel = "7.0.0" okhttp = "4.12.0" diff --git a/ui/common/src/main/java/org/kafka/common/widgets/IconButton.kt b/ui/common/src/main/java/org/kafka/common/widgets/IconButton.kt index 68378ce80..294f22ca8 100644 --- a/ui/common/src/main/java/org/kafka/common/widgets/IconButton.kt +++ b/ui/common/src/main/java/org/kafka/common/widgets/IconButton.kt @@ -5,8 +5,8 @@ import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.BoxScope import androidx.compose.foundation.layout.size +import androidx.compose.material.ripple.rememberRipple import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.ripple import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.Alignment @@ -69,7 +69,7 @@ fun IconButton( role = Role.Button, onClickLabel = onClickLabel, interactionSource = interactionSource, - indication = ripple( + indication = rememberRipple( bounded = false, color = rippleColor, radius = rippleRadius diff --git a/ui/homepage/src/main/java/org/kafka/homepage/components/Carousels.kt b/ui/homepage/src/main/java/org/kafka/homepage/components/Carousels.kt index d6824b5bb..b35481bc2 100644 --- a/ui/homepage/src/main/java/org/kafka/homepage/components/Carousels.kt +++ b/ui/homepage/src/main/java/org/kafka/homepage/components/Carousels.kt @@ -4,12 +4,11 @@ import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyListState import androidx.compose.foundation.lazy.rememberLazyListState +import androidx.compose.foundation.pager.HorizontalPager +import androidx.compose.foundation.pager.rememberPagerState import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material3.carousel.HorizontalMultiBrowseCarousel -import androidx.compose.material3.carousel.rememberCarouselState import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.dp import com.kafka.data.entities.Item import kotlinx.collections.immutable.ImmutableList import org.kafka.ui.components.item.FeaturedItem @@ -23,16 +22,12 @@ internal fun Carousels( modifier: Modifier = Modifier, lazyListState: LazyListState = rememberLazyListState() ) { - val state = rememberCarouselState { carouselItems.size } + val state = rememberPagerState { carouselItems.size } - HorizontalMultiBrowseCarousel( + HorizontalPager( state = state, - preferredItemWidth = 350.dp, - minSmallItemWidth = 56.dp, - maxSmallItemWidth = 72.dp, modifier = modifier.padding(Dimens.Spacing02), contentPadding = PaddingValues(horizontal = Dimens.Spacing12), - itemSpacing = Dimens.Spacing08 ) { index -> carouselItems.getOrNull(index)?.let { item -> FeaturedItem( @@ -40,7 +35,8 @@ internal fun Carousels( label = item.title, imageUrl = images.getOrNull(index), onClick = { onBannerClick(item.itemId) }, - modifier = Modifier.maskClip(shape = RoundedCornerShape(Dimens.Radius20)) + shape = RoundedCornerShape(Dimens.Radius20), + modifier = Modifier.padding(horizontal = Dimens.Spacing04) ) } } diff --git a/ui/item/src/main/java/org/kafka/item/detail/ItemDetail.kt b/ui/item/src/main/java/org/kafka/item/detail/ItemDetail.kt index a4eb1e824..5dd023cb6 100644 --- a/ui/item/src/main/java/org/kafka/item/detail/ItemDetail.kt +++ b/ui/item/src/main/java/org/kafka/item/detail/ItemDetail.kt @@ -246,7 +246,7 @@ private fun ItemDetail( if (state.isLoading) { item(span = { GridItemSpan(GridItemSpan) }) { - Delayed(modifier = Modifier.animateItem()) { + Delayed(modifier = Modifier.animateItemPlacement()) { InfiniteProgressBar() } } diff --git a/ui/search/src/main/java/com.kafka.search/RecentSearches.kt b/ui/search/src/main/java/com.kafka.search/RecentSearches.kt index 9b134a722..bd8655ffb 100644 --- a/ui/search/src/main/java/com.kafka.search/RecentSearches.kt +++ b/ui/search/src/main/java/com.kafka.search/RecentSearches.kt @@ -45,7 +45,7 @@ fun RecentSearches( recentSearch = recentSearch, onSearchClicked = onSearchClicked, onRemoveSearch = onRemoveSearch, - modifier = Modifier.animateItem() + modifier = Modifier.animateItemPlacement() ) } } diff --git a/ui/search/src/main/java/com.kafka.search/SearchViewModel.kt b/ui/search/src/main/java/com.kafka.search/SearchViewModel.kt index 08f08f016..1b18369b5 100644 --- a/ui/search/src/main/java/com.kafka.search/SearchViewModel.kt +++ b/ui/search/src/main/java/com.kafka.search/SearchViewModel.kt @@ -120,7 +120,9 @@ class SearchViewModel @Inject constructor( fun toggleFilter(filter: SearchFilter) { val selectedFilters = state.value.selectedFilters.toMutableList() if (selectedFilters.contains(filter)) { - selectedFilters.remove(filter) + if (selectedFilters.size > 1) { + selectedFilters.remove(filter) + } } else { selectedFilters.add(filter) }