@Suppress("FunctionName") public fun LinkAttachmentFactory(linkDescriptionMaxLines: Int, ): AttachmentFactory = AttachmentFactory(canHandle = { links -> links.any { it.hasLink() && it.type != ModelType.attach_giphy } }, content = @Composable { modifier, state -> LinkAttachmentContent( modifier = modifier.width(ChatTheme.dimens.attachmentsContentLinkWidth).wrapContentHeight(),attachmentState = state,linkDescriptionMaxLines = linkDescriptionMaxLines)},)
An [AttachmentFactory] that validates attachments as images and uses [LinkAttachmentContent] to build the UI for the message. Has no "preview content", given that this attachment only exists after being sent.