Make launcher icon badge clickable as well

This commit is contained in:
MM20 2022-07-31 15:27:08 +02:00
parent b9e65f3c9f
commit 7af9a44bfa
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389
2 changed files with 9 additions and 2 deletions

View File

@ -89,7 +89,7 @@ fun BottomSheetDialog(
available: Velocity
): Velocity {
if (available.y < 0) {
return super.onPreFling(available)
return super.onPostFling(consumed, available)
}
swipeState.performFling(available.y)
return available.copy(x = 0f)

View File

@ -120,7 +120,14 @@ fun ShapedLauncherIcon(
tonalElevation = 1.dp,
modifier = Modifier
.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,
shape = CircleShape
) {