PinnedMessageItem

fun PinnedMessageItem(message: Message, currentUser: User?, onPinnedMessageClick: (Message) -> Unit, modifier: Modifier = Modifier, leadingContent: @Composable RowScope.(Message) -> Unit = { DefaultMessagePreviewItemLeadingContent(it) }, centerContent: @Composable RowScope.(Message) -> Unit = { DefaultMessagePreviewItemCenterContent(it, currentUser) }, trailingContent: @Composable RowScope.(Message) -> Unit = { DefaultMessagePreviewItemTrailingContent(it) })

The basic pinned message item that displays the channel and the message in a list, and exposes click action.

Parameters

message

The Message to be displayed.

currentUser

The currently logged in User.

onPinnedMessageClick

The action to be executed when the item is clicked.

leadingContent

Customizable composable function that represents the leading content of a pinned message, usually the avatar that holds an image of the user that sent the message.

centerContent

Customizable composable function that represents the center content of a pinned message, usually holding information about the message and who and where it was sent.

trailingContent

Customizable composable function that represents the trailing content of a pinned message, usually information about the date where the message was sent.