OtherTextMessageItem

fun OtherTextMessageItem(message: UikitUserMessage, modifier: Modifier = Modifier, onMessageClick: (UikitUserMessage) -> Unit = {}, onMessageLongClick: (UikitUserMessage) -> Unit = {}, onEmojiReactionClick: (UikitBaseMessage, String, Boolean) -> Unit = { _, _, _ -> }, onEmojiReactionLongClick: (UikitBaseMessage, UiKitReaction) -> Unit = { _, _ -> }, onEmojiReactionMoreButtonClick: (UikitBaseMessage) -> Unit = { }, textBackgroundColor: Color = if (SendbirdUikitCompose.isDarkTheme) { MaterialTheme.colorScheme.surfaceContainerHighest } else { MaterialTheme.colorScheme.surfaceBright }, textStyle: TextStyle = MaterialTheme.typography.bodySmall, textColor: Color = MaterialTheme.colorScheme.onBackground, messageGroupingPosition: MessageGroupingPosition = MessageGroupingPosition.Single, emojiReactionList: @Composable (message: UikitBaseMessage) -> Unit = { baseMessage -> EmojiReactionList( message = baseMessage, useMoreButton = true, onEmojiReactionClick = onEmojiReactionClick, onEmojiReactionLongClick = onEmojiReactionLongClick, onEmojiReactionMoreButtonClick = onEmojiReactionMoreButtonClick, ) }, ogTagMessage: @Composable (message: UikitUserMessage) -> Unit = { userMessage -> userMessage.ogMetaData?.let { ogData -> OgTagMessage( modifier = Modifier, ogMetaData = ogData, onLinkClick = { onMessageClick(userMessage) }, onLinkLongClick = { onMessageLongClick(userMessage) }, backgroundColor = if (SendbirdUikitCompose.isDarkTheme) { MaterialTheme.colorScheme.surfaceContainerHighest } else { MaterialTheme.colorScheme.surfaceBright } ) } })

A Composable to display the other user's UikitUserMessage item using the OtherMessageItem.

Since

1.0.0

Parameters

message

The UikitUserMessage to display.

modifier

The modifier to be applied to the view.

onMessageClick

The handler for when the message is clicked.

onMessageLongClick

The handler for when the message is long clicked.

onEmojiReactionClick

The handler for when the reaction is clicked.

onEmojiReactionLongClick

The handler for when the reaction is long clicked.

onEmojiReactionMoreButtonClick

The handler for when the emoji reaction more button is clicked.

textBackgroundColor

The background color of the text message.

textStyle

The style of the text message.

textColor

The color of the text message.

messageGroupingPosition

The position of the message in the message group.

ogTagMessage

The Composable to display the OG tag message.

emojiReactionList

The Composable to display the emoji reaction list.

See also