PollMessageContent

fun PollMessageContent(modifier: Modifier, messageItem: MessageItemState, 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, onLongItemClick: (Message) -> Unit = {})

Message content for the poll, which distinguishes the owner and users and allows them to interact.

Parameters

messageItem

The message item to show the content for.

modifier

Modifier for styling.

onCastVote

Callback when a user cast a vote on an option.

onRemoveVote

Callback when a user remove a vote on an option.

selectPoll

Callback when a user selects a poll.

onAddAnswer

Callback when a user adds a new answer to the poll.

onClosePoll

Callback when a user closes a poll.

onAddPollOption

Callback when a user adds a new option to the poll.

onLongItemClick

Handler when the user selects a message, on long tap.