Package 

Class MessageItemKt

    • Method Summary

      Modifier and Type Method Description
      final static Unit MessageItem(MessageItemState messageItem, ReactionSorting reactionSorting, Function1<Message, Unit> onLongItemClick, Modifier modifier, MessageContentFactory messageContentFactory, Function1<Message, Unit> onReactionsClick, Function1<Message, Unit> onThreadClick, Function2<Message, Poll, Unit> onPollUpdated, Function3<Message, Poll, Option, Unit> onCastVote, Function3<Message, Poll, Vote, Unit> onRemoveVote, Function3<Message, Poll, PollSelectionType, Unit> selectPoll, Function3<Message, Poll, String, Unit> onAddAnswer, Function1<String, Unit> onClosePoll, Function2<Poll, String, Unit> onAddPollOption, Function1<GiphyAction, Unit> onGiphyActionClick, Function1<Message, Unit> onQuotedMessageClick, Function0<Unit> onUserAvatarClick, Function2<Message, String, Unit> onLinkClick, Function1<User, Unit> onUserMentionClick, Function1<Message, Unit> onReply, Function1<MediaGalleryPreviewResult, Unit> onMediaGalleryPreviewResult, Function2<RowScope, MessageItemState, Unit> leadingContent, Function2<ColumnScope, MessageItemState, Unit> headerContent, Function2<ColumnScope, MessageItemState, Unit> centerContent, Function2<ColumnScope, MessageItemState, Unit> footerContent, Function2<RowScope, MessageItemState, Unit> trailingContent, Function1<RowScope, Unit> swipeToReplyContent) The default message container for all messages in the Conversation/Messages screen.
      final static Unit DefaultMessageItemCenterContent(Modifier modifier, MessageItemState messageItem, MessageContentFactory messageContentFactory, Function1<Message, Unit> onLongItemClick, Function1<GiphyAction, Unit> onGiphyActionClick, Function1<Message, Unit> onQuotedMessageClick, Function2<Message, String, Unit> onLinkClick, Function1<User, Unit> onUserMentionClick, Function1<MediaGalleryPreviewResult, Unit> onMediaGalleryPreviewResult, Function2<Message, Poll, Unit> onPollUpdated, Function3<Message, Poll, Option, Unit> onCastVote, Function3<Message, Poll, Vote, Unit> onRemoveVote, Function3<Message, Poll, PollSelectionType, Unit> selectPoll, Function3<Message, Poll, String, Unit> onAddAnswer, Function1<String, Unit> onClosePoll, Function2<Poll, String, Unit> onAddPollOption) Represents the default content shown at the center of the message list item.
      final static Unit EmojiMessageContent(MessageItemState messageItem, Modifier modifier, Function1<Message, Unit> onLongItemClick, Function1<GiphyAction, Unit> onGiphyActionClick, Function1<Message, Unit> onQuotedMessageClick, Function1<MediaGalleryPreviewResult, Unit> onMediaGalleryPreviewResult) Message content when the message consists only of emoji.
      final static Unit RegularMessageContent(MessageItemState messageItem, Modifier modifier, MessageContentFactory messageContentFactory, Function1<Message, Unit> onLongItemClick, Function1<GiphyAction, Unit> onGiphyActionClick, Function1<Message, Unit> onQuotedMessageClick, Function2<Message, String, Unit> onLinkClick, Function1<User, Unit> onUserMentionClick, Function1<MediaGalleryPreviewResult, Unit> onMediaGalleryPreviewResult) Message content for messages which consist of more than just emojis.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • MessageItem

        @Composable() final static Unit MessageItem(MessageItemState messageItem, ReactionSorting reactionSorting, Function1<Message, Unit> onLongItemClick, Modifier modifier, MessageContentFactory messageContentFactory, Function1<Message, Unit> onReactionsClick, Function1<Message, Unit> onThreadClick, Function2<Message, Poll, Unit> onPollUpdated, Function3<Message, Poll, Option, Unit> onCastVote, Function3<Message, Poll, Vote, Unit> onRemoveVote, Function3<Message, Poll, PollSelectionType, Unit> selectPoll, Function3<Message, Poll, String, Unit> onAddAnswer, Function1<String, Unit> onClosePoll, Function2<Poll, String, Unit> onAddPollOption, Function1<GiphyAction, Unit> onGiphyActionClick, Function1<Message, Unit> onQuotedMessageClick, Function0<Unit> onUserAvatarClick, Function2<Message, String, Unit> onLinkClick, Function1<User, Unit> onUserMentionClick, Function1<Message, Unit> onReply, Function1<MediaGalleryPreviewResult, Unit> onMediaGalleryPreviewResult, Function2<RowScope, MessageItemState, Unit> leadingContent, Function2<ColumnScope, MessageItemState, Unit> headerContent, Function2<ColumnScope, MessageItemState, Unit> centerContent, Function2<ColumnScope, MessageItemState, Unit> footerContent, Function2<RowScope, MessageItemState, Unit> trailingContent, Function1<RowScope, Unit> swipeToReplyContent)

        The default message container for all messages in the Conversation/Messages screen.

        It shows the avatar and the message details, which can have a header (reactions), the content which can be a text message, file or image attachment, or a custom attachment and the footer, which can be a deleted message footer (if we own the message) or the default footer, which contains a timestamp or the thread information.

        It also allows for long click and thread click events.

        Parameters:
        messageItem - The message item to show, which holds the message and the group position, if the message is in a group of messages from the same user.
        reactionSorting - The sorting for the reactions, if we have any.
        onLongItemClick - Handler when the user selects a message, on long tap.
        modifier - Modifier for styling.
        onReactionsClick - Handler when the user taps on message reactions.
        onThreadClick - Handler for thread clicks, if this message has a thread going.
        onCastVote - Handler for casting a vote on an option.
        onRemoveVote - Handler for removing a vote on an option.
        selectPoll - Handler for selecting a poll.
        onAddAnswer - Handler for adding an answer to a poll.
        onClosePoll - Handler for closing a poll.
        onAddPollOption - Handler for adding a poll option.
        onGiphyActionClick - Handler when the user taps on an action button in a giphy message item.
        onQuotedMessageClick - Handler for quoted message click action.
        onUserAvatarClick - Handler when users avatar is clicked.
        onLinkClick - Handler for clicking on a link in the message.
        onMediaGalleryPreviewResult - Handler when the user selects an option in the Media Gallery Preview screen.
        leadingContent - The content shown at the start of a message list item.
        headerContent - The content shown at the top of a message list item.
        centerContent - The content shown at the center of a message list item.
        footerContent - The content shown at the bottom of a message list item.
        trailingContent - The content shown at the end of a message list item.
      • DefaultMessageItemCenterContent

        @Composable() final static Unit DefaultMessageItemCenterContent(Modifier modifier, MessageItemState messageItem, MessageContentFactory messageContentFactory, Function1<Message, Unit> onLongItemClick, Function1<GiphyAction, Unit> onGiphyActionClick, Function1<Message, Unit> onQuotedMessageClick, Function2<Message, String, Unit> onLinkClick, Function1<User, Unit> onUserMentionClick, Function1<MediaGalleryPreviewResult, Unit> onMediaGalleryPreviewResult, Function2<Message, Poll, Unit> onPollUpdated, Function3<Message, Poll, Option, Unit> onCastVote, Function3<Message, Poll, Vote, Unit> onRemoveVote, Function3<Message, Poll, PollSelectionType, Unit> selectPoll, Function3<Message, Poll, String, Unit> onAddAnswer, Function1<String, Unit> onClosePoll, Function2<Poll, String, Unit> onAddPollOption)

        Represents the default content shown at the center of the message list item.

        By default, we show a message bubble with attachments or emoji stickers if message is emoji only.

        Parameters:
        messageItem - The message item to show the content for.
        onLongItemClick - Handler when the user selects a message, on long tap.
        onGiphyActionClick - Handler when the user taps on an action button in a giphy message item.
        onQuotedMessageClick - Handler for quoted message click action.
        onLinkClick - Handler for clicking on a link in the message.
        onMediaGalleryPreviewResult - Handler when the user selects an option in the Media Gallery Preview screen.
        onCastVote - Handler when a user cast a vote on an option.
        onRemoveVote - Handler when a user cast a remove on an option.
        onClosePoll - Handler when a user close a poll.
        onAddPollOption - Handler when a user add a poll option.
      • EmojiMessageContent

        @Composable() final static Unit EmojiMessageContent(MessageItemState messageItem, Modifier modifier, Function1<Message, Unit> onLongItemClick, Function1<GiphyAction, Unit> onGiphyActionClick, Function1<Message, Unit> onQuotedMessageClick, Function1<MediaGalleryPreviewResult, Unit> onMediaGalleryPreviewResult)

        Message content when the message consists only of emoji.

        Parameters:
        messageItem - The message item to show the content for.
        modifier - Modifier for styling.
        onLongItemClick - Handler when the user selects a message, on long tap.
        onGiphyActionClick - Handler when the user taps on an action button in a giphy message item.
        onQuotedMessageClick - Handler for quoted message click action.
        onMediaGalleryPreviewResult - Handler used when the user selects an option in the Media Gallery Preview screen.
      • RegularMessageContent

        @Composable() final static Unit RegularMessageContent(MessageItemState messageItem, Modifier modifier, MessageContentFactory messageContentFactory, Function1<Message, Unit> onLongItemClick, Function1<GiphyAction, Unit> onGiphyActionClick, Function1<Message, Unit> onQuotedMessageClick, Function2<Message, String, Unit> onLinkClick, Function1<User, Unit> onUserMentionClick, Function1<MediaGalleryPreviewResult, Unit> onMediaGalleryPreviewResult)

        Message content for messages which consist of more than just emojis.

        Parameters:
        messageItem - The message item to show the content for.
        modifier - Modifier for styling.
        onLongItemClick - Handler when the user selects a message, on long tap.
        onGiphyActionClick - Handler when the user taps on an action button in a giphy message item.
        onQuotedMessageClick - Handler for quoted message click action.
        onLinkClick - Handler for clicking on a link in the message.
        onMediaGalleryPreviewResult - Handler when the user selects an option in the Media Gallery Preview screen.