MessageItemParams

data class MessageItemParams(val messageListItem: MessageListItemState, val onPollUpdated: (Message, Poll) -> Unit = { _, _ -> }, val onCastVote: (Message, Poll, Option) -> Unit = { _, _, _ -> }, val onRemoveVote: (Message, Poll, Vote) -> Unit = { _, _, _ -> }, val selectPoll: (Message, Poll, PollSelectionType) -> Unit = { _, _, _ -> }, val onClosePoll: (String) -> Unit = {}, val onAddPollOption: (Poll, String) -> Unit = { _, _ -> }, val onLongItemClick: (Message) -> Unit = {}, val onThreadClick: (Message) -> Unit = {}, val onReactionsClick: (Message) -> Unit = {}, val onGiphyActionClick: (GiphyAction) -> Unit = {}, val onMediaGalleryPreviewResult: (MediaGalleryPreviewResult?) -> Unit = {}, val onQuotedMessageClick: (Message) -> Unit = {}, val onUserMentionClick: (User) -> Unit = {}, val onAddAnswer: (Message, Poll, String) -> Unit = { _, _, _ -> }, val onReply: (Message) -> Unit = {}, val onUserAvatarClick: (User) -> Unit? = null, val onMessageLinkClick: (Message, String) -> Unit? = null)

Parameters for ChatComponentFactory.MessageItem.

Parameters

messageListItem

The message list item state.

onPollUpdated

Action invoked when a poll is updated.

onCastVote

Action invoked when a vote is cast.

onRemoveVote

Action invoked when a vote is removed.

selectPoll

Action invoked when a poll selection is made.

onClosePoll

Action invoked when a poll is closed.

onAddPollOption

Action invoked when a poll option is added.

onLongItemClick

Action invoked when a message is long-clicked.

onThreadClick

Action invoked when the thread is clicked.

onReactionsClick

Action invoked when reactions are clicked.

onGiphyActionClick

Action invoked when a Giphy action is clicked.

onMediaGalleryPreviewResult

Action invoked with the media gallery preview result.

onQuotedMessageClick

Action invoked when a quoted message is clicked.

onUserMentionClick

Action invoked when a user mention is clicked.

onAddAnswer

Action invoked when an answer is added to a poll.

onReply

Action invoked when the reply button is clicked.

onUserAvatarClick

Action invoked when a user avatar is clicked.

onMessageLinkClick

Action invoked when a link in a message is clicked.

Constructors

Link copied to clipboard
constructor(messageListItem: MessageListItemState, onPollUpdated: (Message, Poll) -> Unit = { _, _ -> }, onCastVote: (Message, Poll, Option) -> Unit = { _, _, _ -> }, onRemoveVote: (Message, Poll, Vote) -> Unit = { _, _, _ -> }, selectPoll: (Message, Poll, PollSelectionType) -> Unit = { _, _, _ -> }, onClosePoll: (String) -> Unit = {}, onAddPollOption: (Poll, String) -> Unit = { _, _ -> }, onLongItemClick: (Message) -> Unit = {}, onThreadClick: (Message) -> Unit = {}, onReactionsClick: (Message) -> Unit = {}, onGiphyActionClick: (GiphyAction) -> Unit = {}, onMediaGalleryPreviewResult: (MediaGalleryPreviewResult?) -> Unit = {}, onQuotedMessageClick: (Message) -> Unit = {}, onUserMentionClick: (User) -> Unit = {}, onAddAnswer: (Message, Poll, String) -> Unit = { _, _, _ -> }, onReply: (Message) -> Unit = {}, onUserAvatarClick: (User) -> Unit? = null, onMessageLinkClick: (Message, String) -> Unit? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val onReply: (Message) -> Unit
Link copied to clipboard
Link copied to clipboard
val onUserAvatarClick: (User) -> Unit? = null
Link copied to clipboard
Link copied to clipboard