Upgrade combose-bom to latest

This commit is contained in:
AntsyLich 2024-01-29 13:25:01 +06:00
parent 5dc6501688
commit 47e5421527
No known key found for this signature in database
6 changed files with 13 additions and 10 deletions

View file

@ -10,7 +10,7 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.CheckCircle import androidx.compose.material.icons.filled.CheckCircle
import androidx.compose.material.icons.outlined.ArrowDownward import androidx.compose.material.icons.outlined.ArrowDownward
import androidx.compose.material.icons.outlined.ErrorOutline import androidx.compose.material.icons.outlined.ErrorOutline
import androidx.compose.material.ripple.rememberRipple import androidx.compose.material.ripple
import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.DropdownMenuItem import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.Icon import androidx.compose.material3.Icon
@ -256,7 +256,7 @@ private fun Modifier.commonClickable(
onClick = onClick, onClick = onClick,
role = Role.Button, role = Role.Button,
interactionSource = remember { MutableInteractionSource() }, interactionSource = remember { MutableInteractionSource() },
indication = rememberRipple( indication = ripple(
bounded = false, bounded = false,
radius = IconButtonTokens.StateLayerSize / 2, radius = IconButtonTokens.StateLayerSize / 2,
), ),

View file

@ -30,7 +30,7 @@ import androidx.compose.material.icons.outlined.Delete
import androidx.compose.material.icons.outlined.DoneAll import androidx.compose.material.icons.outlined.DoneAll
import androidx.compose.material.icons.outlined.Download import androidx.compose.material.icons.outlined.Download
import androidx.compose.material.icons.outlined.RemoveDone 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.Icon
import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface import androidx.compose.material3.Surface
@ -192,7 +192,7 @@ private fun RowScope.Button(
.weight(animatedWeight) .weight(animatedWeight)
.combinedClickable( .combinedClickable(
interactionSource = remember { MutableInteractionSource() }, interactionSource = remember { MutableInteractionSource() },
indication = rememberRipple(bounded = false), indication = ripple(bounded = false),
onLongClick = onLongClick, onLongClick = onLongClick,
onClick = onClick, onClick = onClick,
), ),

View file

@ -1,7 +1,7 @@
[versions] [versions]
compiler = "1.5.8" compiler = "1.5.8"
compose-bom = "2024.01.00-alpha01" compose-bom = "2024.01.00-alpha03"
accompanist = "0.33.2-alpha" accompanist = "0.34.0"
[libraries] [libraries]
activity = "androidx.activity:activity-compose:1.8.2" activity = "androidx.activity:activity-compose:1.8.2"

View file

@ -3,6 +3,7 @@ package tachiyomi.presentation.core.components
import androidx.activity.compose.BackHandler import androidx.activity.compose.BackHandler
import androidx.compose.animation.core.animateFloatAsState import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.animation.core.tween import androidx.compose.animation.core.tween
import androidx.compose.animation.rememberSplineBasedDecay
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import androidx.compose.foundation.gestures.AnchoredDraggableState import androidx.compose.foundation.gestures.AnchoredDraggableState
import androidx.compose.foundation.gestures.DraggableAnchors import androidx.compose.foundation.gestures.DraggableAnchors
@ -110,12 +111,14 @@ fun AdaptiveSheet(
} }
} }
} else { } else {
val decayAnimationSpec = rememberSplineBasedDecay<Float>()
val anchoredDraggableState = remember { val anchoredDraggableState = remember {
AnchoredDraggableState( AnchoredDraggableState(
initialValue = 1, initialValue = 1,
animationSpec = sheetAnimationSpec,
positionalThreshold = { with(density) { 56.dp.toPx() } }, positionalThreshold = { with(density) { 56.dp.toPx() } },
velocityThreshold = { with(density) { 125.dp.toPx() } }, velocityThreshold = { with(density) { 125.dp.toPx() } },
snapAnimationSpec = sheetAnimationSpec,
decayAnimationSpec = decayAnimationSpec,
) )
} }
val internalOnDismissRequest = { val internalOnDismissRequest = {

View file

@ -40,7 +40,7 @@ fun HorizontalPager(
modifier = modifier, modifier = modifier,
contentPadding = contentPadding, contentPadding = contentPadding,
pageSize = pageSize, pageSize = pageSize,
beyondBoundsPageCount = beyondBoundsPageCount, outOfBoundsPageCount = beyondBoundsPageCount,
pageSpacing = pageSpacing, pageSpacing = pageSpacing,
verticalAlignment = verticalAlignment, verticalAlignment = verticalAlignment,
flingBehavior = PagerDefaults.flingBehavior( flingBehavior = PagerDefaults.flingBehavior(

View file

@ -6,7 +6,7 @@ import androidx.compose.foundation.border
import androidx.compose.foundation.combinedClickable import androidx.compose.foundation.combinedClickable
import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Box 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.ColorScheme
import androidx.compose.material3.LocalAbsoluteTonalElevation import androidx.compose.material3.LocalAbsoluteTonalElevation
import androidx.compose.material3.LocalContentColor import androidx.compose.material3.LocalContentColor
@ -70,7 +70,7 @@ fun Surface(
) )
.combinedClickable( .combinedClickable(
interactionSource = interactionSource, interactionSource = interactionSource,
indication = rememberRipple(), indication = ripple(),
enabled = enabled, enabled = enabled,
role = Role.Button, role = Role.Button,
onLongClick = onLongClick, onLongClick = onLongClick,