LinkAttachmentContent

fun LinkAttachmentContent(state: AttachmentState, linkDescriptionMaxLines: Int, modifier: Modifier = Modifier, onItemClick: (LinkAttachmentClickData) -> Unit = { onLinkAttachmentContentClick(it.context, it.url) })

Builds a link attachment message, which shows the link image preview, the title of the link as well as its description.

When clicking it, we open the preview link.

Parameters

state
  • The state of the attachment, holding the root modifier, the message and the onLongItemClick handler.

linkDescriptionMaxLines
  • The limit of how many lines we show for the link description.

modifier

Modifier for styling.

onItemClick

Lambda called when an item gets clicked.


fun LinkAttachmentContent(attachmentState: AttachmentState, linkDescriptionMaxLines: Int, modifier: Modifier = Modifier, onItemClick: (context: Context, url: String) -> Unit)

Deprecated

Use the version with the `onItemClick` parameter that accepts a LinkAttachmentClickData.

Replace with

LinkAttachmentContent(attachmentState, linkDescriptionMaxLines, modifier, onItemClick)

Builds a link attachment message, which shows the link image preview, the title of the link as well as its description.

When clicking it, we open the preview link.

Parameters

attachmentState
  • The state of the attachment, holding the root modifier, the message and the onLongItemClick handler.

linkDescriptionMaxLines
  • The limit of how many lines we show for the link description.

modifier

Modifier for styling.

onItemClick

Lambda called when an item gets clicked.