@OptIn(ExperimentalFoundationApi::class) @Composable public fun FileAttachmentContent( attachmentState: AttachmentState,modifier: Modifier = Modifier,) {val (message, onItemLongClick) = attachmentState val previewHandlers = ChatTheme.attachmentPreviewHandlers Column(modifier = modifier.combinedClickable( indication = null, interactionSource = remember { MutableInteractionSource() }, onClick = {}, onLongClick = { onItemLongClick(message) })) {for (attachment in message.attachments) {FileAttachmentItem(modifier = Modifier.padding(2.dp).fillMaxWidth().combinedClickable(indication = null,interactionSource = remember { MutableInteractionSource() },onClick = {previewHandlers.firstOrNull { it.canHandle(attachment) }.handleAttachmentPreview(attachment)},onLongClick = { onItemLongClick(message) },),attachment = attachment)}}}
Builds a file attachment message which shows a list of files.