fun MessageContainer(messageListItemState: MessageListItemState, reactionSorting: ReactionSorting, onLongItemClick: (Message) -> Unit = {}, onReactionsClick: (Message) -> Unit = {}, onThreadClick: (Message) -> Unit = {}, onPollUpdated: (Message, Poll) -> Unit = { _, _ -> }, onCastVote: (Message, Poll, Option) -> Unit = { _, _, _ -> }, onRemoveVote: (Message, Poll, Vote) -> Unit = { _, _, _ -> }, selectPoll: (Message, Poll, PollSelectionType) -> Unit = { _, _, _ -> }, onAddAnswer: (message: Message, poll: Poll, answer: String) -> Unit = { _, _, _ -> }, onClosePoll: (String) -> Unit = {}, onAddPollOption: (poll: Poll, option: String) -> Unit = { _, _ -> }, onGiphyActionClick: (GiphyAction) -> Unit = {}, onQuotedMessageClick: (Message) -> Unit = {}, onUserAvatarClick: (User) -> Unit? = null, onLinkClick: (Message, String) -> Unit? = null, onMediaGalleryPreviewResult: (MediaGalleryPreviewResult?) -> Unit = {}, onUserMentionClick: (User) -> Unit = {}, dateSeparatorContent: @Composable (DateSeparatorItemState) -> Unit = {
DefaultMessageDateSeparatorContent(dateSeparator = it)
}, unreadSeparatorContent: @Composable (UnreadSeparatorItemState) -> Unit = {
DefaultMessageUnreadSeparatorContent(unreadSeparatorItemState = it)
}, threadSeparatorContent: @Composable (ThreadDateSeparatorItemState) -> Unit = {
DefaultMessageThreadSeparatorContent(threadSeparator = it)
}, systemMessageContent: @Composable (SystemMessageItemState) -> Unit = {
DefaultSystemMessageContent(systemMessageState = it)
}, messageItemContent: @Composable (MessageItemState) -> Unit = {
DefaultMessageItem(
messageItem = it,
reactionSorting = reactionSorting,
onLongItemClick = onLongItemClick,
onReactionsClick = onReactionsClick,
onThreadClick = onThreadClick,
onPollUpdated = onPollUpdated,
onCastVote = onCastVote,
onRemoveVote = onRemoveVote,
selectPoll = selectPoll,
onClosePoll = onClosePoll,
onAddPollOption = onAddPollOption,
onGiphyActionClick = onGiphyActionClick,
onMediaGalleryPreviewResult = onMediaGalleryPreviewResult,
onQuotedMessageClick = onQuotedMessageClick,
onUserAvatarClick = {
onUserAvatarClick?.invoke(it.message.user)
},
onLinkClick = onLinkClick,
onUserMentionClick = onUserMentionClick,
onAddAnswer = onAddAnswer,
)
}, typingIndicatorContent: @Composable (TypingItemState) -> Unit = { }, emptyThreadPlaceholderItemContent: @Composable (EmptyThreadPlaceholderItemState) -> Unit = { }, startOfTheChannelItemState: @Composable (StartOfTheChannelItemState) -> Unit = { }) Represents the message item container that allows us to customize each type of item in the MessageList.
Parameters
The state of the message list item.
The sorting of reactions for the message.
Handler when the user long taps on an item.
Handler when the user taps on message reactions.
Handler when the user taps on a thread within a message item.
Handler when the user taps on Giphy message actions.
Handler for casting a vote on an option.
Handler for closing a poll.
Handler for updating a poll.
Handler for quoted message click action.
Handler when users avatar is clicked.
Handler for clicking on a link in the message.
onMediaGalleryPreviewResult
Handler when the user receives a result from the Media Gallery Preview.
Composable that represents date separators.
Composable that represents thread separators.
Composable that represents system messages.
Composable that represents regular messages.
Composable that represents a typing indicator.
emptyThreadPlaceholderItemContent