QuotedMessage

fun QuotedMessage(message: Message, currentUser: User?, onLongItemClick: (Message) -> Unit, onQuotedMessageClick: (Message) -> Unit, modifier: Modifier = Modifier, replyMessage: Message? = null, leadingContent: @Composable (Message) -> Unit = { DefaultQuotedMessageLeadingContent( message = it, currentUser = currentUser, ) }, centerContent: @Composable RowScope.(Message) -> Unit = { DefaultQuotedMessageCenterContent( message = it, replyMessage = replyMessage, currentUser = currentUser, ) }, trailingContent: @Composable (Message) -> Unit = { DefaultQuotedMessageTrailingContent( message = it, currentUser = currentUser, ) })

Wraps the quoted message into a component that shows only the sender avatar, text and single attachment preview.

Parameters

message

The quoted message to show.

currentUser

The currently logged in user.

onLongItemClick

Handler when the item is long clicked.

onQuotedMessageClick

Handler for quoted message click action.

modifier

Modifier for styling.

replyMessage

The message that contains the reply.

leadingContent

The content shown at the start of the quoted message. By default we provide DefaultQuotedMessageLeadingContent which shows the sender avatar in case the sender is not the current user.

centerContent

The content shown at the center of the quoted message. By default we provide DefaultQuotedMessageCenterContent which shows single attachment preview and message text inside a bubble.

trailingContent

The content shown at the end of the quoted message. By default we provide DefaultQuotedMessageTrailingContent which shows the sender avatar in case the sender is the current user.