Make launcher icon badge clickable as well
This commit is contained in:
parent
b9e65f3c9f
commit
7af9a44bfa
@ -89,7 +89,7 @@ fun BottomSheetDialog(
|
|||||||
available: Velocity
|
available: Velocity
|
||||||
): Velocity {
|
): Velocity {
|
||||||
if (available.y < 0) {
|
if (available.y < 0) {
|
||||||
return super.onPreFling(available)
|
return super.onPostFling(consumed, available)
|
||||||
}
|
}
|
||||||
swipeState.performFling(available.y)
|
swipeState.performFling(available.y)
|
||||||
return available.copy(x = 0f)
|
return available.copy(x = 0f)
|
||||||
|
|||||||
@ -120,7 +120,14 @@ fun ShapedLauncherIcon(
|
|||||||
tonalElevation = 1.dp,
|
tonalElevation = 1.dp,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(size * 0.33f)
|
.size(size * 0.33f)
|
||||||
.align(Alignment.BottomEnd),
|
.align(Alignment.BottomEnd)
|
||||||
|
.combinedClickable(
|
||||||
|
enabled = onClick != null || onLongClick != null,
|
||||||
|
onClick = {
|
||||||
|
onClick?.invoke()
|
||||||
|
},
|
||||||
|
onLongClick = onLongClick,
|
||||||
|
),
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = MaterialTheme.colorScheme.secondary,
|
||||||
shape = CircleShape
|
shape = CircleShape
|
||||||
) {
|
) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user