fix: tap anywhere outside attachment menu to dismiss it
This commit is contained in:
parent
b94a0a8845
commit
e56e9a4c83
1 changed files with 12 additions and 0 deletions
|
|
@ -552,6 +552,18 @@ fun ChatScreen(
|
|||
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
|
||||
androidx.compose.animation.AnimatedVisibility(
|
||||
visible = showAttachMenu,
|
||||
|
|
|
|||
Loading…
Reference in a new issue