fix: tap anywhere outside attachment menu to dismiss it

This commit is contained in:
Bruno Deanoz 2026-06-21 19:01:48 +02:00
parent b94a0a8845
commit e56e9a4c83

View file

@ -552,6 +552,18 @@ fun ChatScreen(
Spacer(Modifier.height(16.dp)) Spacer(Modifier.height(16.dp))
} }
// Dismiss scrim — tap anywhere to close the attachment menu
if (showAttachMenu) {
Box(
Modifier
.fillMaxSize()
.clickable(
interactionSource = remember { androidx.compose.foundation.interaction.MutableInteractionSource() },
indication = null,
) { showAttachMenu = false }
)
}
// Attachment menu — floats above the + button at bottom-left // Attachment menu — floats above the + button at bottom-left
androidx.compose.animation.AnimatedVisibility( androidx.compose.animation.AnimatedVisibility(
visible = showAttachMenu, visible = showAttachMenu,