diff --git a/app/src/main/java/eu/kanade/presentation/components/ItemDownloadIndicator.kt b/app/src/main/java/eu/kanade/presentation/components/ItemDownloadIndicator.kt index 7c8f263fd..1bf74f6b2 100644 --- a/app/src/main/java/eu/kanade/presentation/components/ItemDownloadIndicator.kt +++ b/app/src/main/java/eu/kanade/presentation/components/ItemDownloadIndicator.kt @@ -4,7 +4,7 @@ import androidx.compose.foundation.combinedClickable import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.material.ripple.rememberRipple +import androidx.compose.material.ripple import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.composed @@ -32,7 +32,7 @@ internal fun Modifier.commonClickable( onClick = onClick, role = Role.Button, interactionSource = remember { MutableInteractionSource() }, - indication = rememberRipple( + indication = ripple( bounded = false, radius = IconButtonTokens.StateLayerSize / 2, ), diff --git a/app/src/main/java/eu/kanade/presentation/entries/components/EntryBottomActionMenu.kt b/app/src/main/java/eu/kanade/presentation/entries/components/EntryBottomActionMenu.kt index 5bdf995af..bd12639d3 100644 --- a/app/src/main/java/eu/kanade/presentation/entries/components/EntryBottomActionMenu.kt +++ b/app/src/main/java/eu/kanade/presentation/entries/components/EntryBottomActionMenu.kt @@ -32,7 +32,7 @@ import androidx.compose.material.icons.outlined.Download import androidx.compose.material.icons.outlined.Input import androidx.compose.material.icons.outlined.OpenInNew import androidx.compose.material.icons.outlined.RemoveDone -import androidx.compose.material.ripple.rememberRipple +import androidx.compose.material.ripple import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface @@ -235,7 +235,7 @@ private fun RowScope.Button( .weight(animatedWeight) .combinedClickable( interactionSource = remember { MutableInteractionSource() }, - indication = rememberRipple(bounded = false), + indication = ripple(bounded = false), onLongClick = onLongClick, onClick = onClick, ), diff --git a/gradle/compose.versions.toml b/gradle/compose.versions.toml index 58f7447e8..9c9825449 100644 --- a/gradle/compose.versions.toml +++ b/gradle/compose.versions.toml @@ -1,7 +1,7 @@ [versions] compiler = "1.5.8" -compose-bom = "2024.01.00-alpha01" -accompanist = "0.33.2-alpha" +compose-bom = "2024.01.00-alpha03" +accompanist = "0.34.0" [libraries] activity = "androidx.activity:activity-compose:1.8.2" diff --git a/presentation-core/src/main/java/tachiyomi/presentation/core/components/AdaptiveSheet.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/components/AdaptiveSheet.kt index 45ce05be6..9c2adf630 100644 --- a/presentation-core/src/main/java/tachiyomi/presentation/core/components/AdaptiveSheet.kt +++ b/presentation-core/src/main/java/tachiyomi/presentation/core/components/AdaptiveSheet.kt @@ -4,6 +4,7 @@ import android.content.res.Configuration.ORIENTATION_LANDSCAPE import androidx.activity.compose.BackHandler import androidx.compose.animation.core.animateFloatAsState import androidx.compose.animation.core.tween +import androidx.compose.animation.rememberSplineBasedDecay import androidx.compose.foundation.clickable import androidx.compose.foundation.gestures.AnchoredDraggableState import androidx.compose.foundation.gestures.DraggableAnchors @@ -118,12 +119,14 @@ fun AdaptiveSheet( } } } else { + val decayAnimationSpec = rememberSplineBasedDecay() val anchoredDraggableState = remember { AnchoredDraggableState( initialValue = 1, - animationSpec = sheetAnimationSpec, positionalThreshold = { with(density) { 56.dp.toPx() } }, velocityThreshold = { with(density) { 125.dp.toPx() } }, + snapAnimationSpec = sheetAnimationSpec, + decayAnimationSpec = decayAnimationSpec, ) } val internalOnDismissRequest = { diff --git a/presentation-core/src/main/java/tachiyomi/presentation/core/components/Pager.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/components/Pager.kt index 521f988b8..fb3cbdf74 100644 --- a/presentation-core/src/main/java/tachiyomi/presentation/core/components/Pager.kt +++ b/presentation-core/src/main/java/tachiyomi/presentation/core/components/Pager.kt @@ -40,7 +40,7 @@ fun HorizontalPager( modifier = modifier, contentPadding = contentPadding, pageSize = pageSize, - beyondBoundsPageCount = beyondBoundsPageCount, + outOfBoundsPageCount = beyondBoundsPageCount, pageSpacing = pageSpacing, verticalAlignment = verticalAlignment, flingBehavior = PagerDefaults.flingBehavior( diff --git a/presentation-core/src/main/java/tachiyomi/presentation/core/components/material/Surface.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/components/material/Surface.kt index eda45695f..f6def1224 100644 --- a/presentation-core/src/main/java/tachiyomi/presentation/core/components/material/Surface.kt +++ b/presentation-core/src/main/java/tachiyomi/presentation/core/components/material/Surface.kt @@ -6,7 +6,7 @@ import androidx.compose.foundation.border import androidx.compose.foundation.combinedClickable import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.layout.Box -import androidx.compose.material.ripple.rememberRipple +import androidx.compose.material.ripple import androidx.compose.material3.ColorScheme import androidx.compose.material3.LocalAbsoluteTonalElevation import androidx.compose.material3.LocalContentColor @@ -70,7 +70,7 @@ fun Surface( ) .combinedClickable( interactionSource = interactionSource, - indication = rememberRipple(), + indication = ripple(), enabled = enabled, role = Role.Button, onLongClick = onLongClick,