Package 

Class MessageListKt

    • Method Summary

      Modifier and Type Method Description
      final static Unit MessageList(MessageListViewModel viewModel, ReactionSorting reactionSorting, Modifier modifier, PaddingValues contentPadding, MessageContentFactory messageContentFactory, MessagesLazyListState messagesLazyListState, Arrangement.Vertical verticalArrangement, Arrangement.Vertical threadsVerticalArrangement, ThreadMessagesStart threadMessagesStart, Function1<Message, Unit> onThreadClick, Function1<Message, Unit> onLongItemClick, Function1<Message, Unit> onReactionsClick, Function0<Unit> onMessagesPageStartReached, Function1<Message, Unit> onLastVisibleMessageChanged, Function0<Unit> onScrollToBottom, Function1<GiphyAction, Unit> onGiphyActionClick, 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<Message, Unit> onQuotedMessageClick, Function1<User, Unit> onUserAvatarClick, Function2<Message, String, Unit> onMessageLinkClick, Function1<User, Unit> onUserMentionClick, Function1<Message, Unit> onReply, Function1<MediaGalleryPreviewResult, Unit> onMediaGalleryPreviewResult, Function1<String, Unit> onMessagesPageEndReached, Function1<Function0<Unit>, Unit> onScrollToBottomClicked, Function0<Unit> onPauseAudioRecordingAttachments, Function0<Unit> loadingContent, Function0<Unit> emptyContent, Function1<BoxScope, Unit> helperContent, Function1<LazyItemScope, Unit> loadingMoreContent, Function2<LazyItemScope, MessageListItemState, Unit> itemContent) Default MessageList component, that relies on MessageListViewModel to connect all the data handling operations.
      final static Unit MessageList(MessageListState currentState, Arrangement.Vertical verticalArrangement, Arrangement.Vertical threadsVerticalArrangement, ThreadMessagesStart threadMessagesStart, ReactionSorting reactionSorting, Modifier modifier, PaddingValues contentPadding, MessageContentFactory messageContentFactory, MessagesLazyListState messagesLazyListState, Function0<Unit> onMessagesPageStartReached, Function1<Message, Unit> onLastVisibleMessageChanged, Function0<Unit> onScrolledToBottom, 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<Message, Unit> onThreadClick, Function1<Message, Unit> onLongItemClick, Function1<Message, Unit> onReactionsClick, Function1<MediaGalleryPreviewResult, Unit> onMediaGalleryPreviewResult, Function1<GiphyAction, Unit> onGiphyActionClick, Function1<Message, Unit> onQuotedMessageClick, Function1<String, Unit> onMessagesPageEndReached, Function1<Function0<Unit>, Unit> onScrollToBottom, Function0<Unit> onPauseAudioRecordingAttachments, Function1<User, Unit> onUserAvatarClick, Function2<Message, String, Unit> onMessageLinkClick, Function1<User, Unit> onUserMentionClick, Function1<Message, Unit> onReply, Function0<Unit> background, Function0<Unit> loadingContent, Function0<Unit> emptyContent, Function1<BoxScope, Unit> helperContent, Function1<LazyItemScope, Unit> loadingMoreContent, Function3<LazyItemScope, Integer, MessageListItemState, Modifier> itemModifier, Function2<LazyItemScope, MessageListItemState, Unit> itemContent) Clean representation of the MessageList that is decoupled from ViewModels.
      • Methods inherited from class java.lang.Object

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

      • MessageList

        @Composable() final static Unit MessageList(MessageListViewModel viewModel, ReactionSorting reactionSorting, Modifier modifier, PaddingValues contentPadding, MessageContentFactory messageContentFactory, MessagesLazyListState messagesLazyListState, Arrangement.Vertical verticalArrangement, Arrangement.Vertical threadsVerticalArrangement, ThreadMessagesStart threadMessagesStart, Function1<Message, Unit> onThreadClick, Function1<Message, Unit> onLongItemClick, Function1<Message, Unit> onReactionsClick, Function0<Unit> onMessagesPageStartReached, Function1<Message, Unit> onLastVisibleMessageChanged, Function0<Unit> onScrollToBottom, Function1<GiphyAction, Unit> onGiphyActionClick, 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<Message, Unit> onQuotedMessageClick, Function1<User, Unit> onUserAvatarClick, Function2<Message, String, Unit> onMessageLinkClick, Function1<User, Unit> onUserMentionClick, Function1<Message, Unit> onReply, Function1<MediaGalleryPreviewResult, Unit> onMediaGalleryPreviewResult, Function1<String, Unit> onMessagesPageEndReached, Function1<Function0<Unit>, Unit> onScrollToBottomClicked, Function0<Unit> onPauseAudioRecordingAttachments, Function0<Unit> loadingContent, Function0<Unit> emptyContent, Function1<BoxScope, Unit> helperContent, Function1<LazyItemScope, Unit> loadingMoreContent, Function2<LazyItemScope, MessageListItemState, Unit> itemContent)

        Default MessageList component, that relies on MessageListViewModel to connect all the data handling operations. It also delegates events to the ViewModel to handle, like long item clicks and pagination.

        Parameters:
        viewModel - The ViewModel that stores all the data and business logic required to show a list of messages.
        reactionSorting - The sorting of the reactions.
        modifier - Modifier for styling.
        contentPadding - Padding values to be applied to the message list surrounding the content inside.
        messagesLazyListState - State of the lazy list that represents the list of messages.
        verticalArrangement - Vertical arrangement of the regular message list.
        threadsVerticalArrangement - Vertical arrangement of the thread message list.
        threadMessagesStart - Thread messages start at the bottom or top of the screen.
        onThreadClick - Handler when the user taps on the message, while there's a thread going.
        onLongItemClick - Handler for when the user long taps on a message and selects it.
        onReactionsClick - Handler when the user taps on message reactions and selects them.
        onMessagesPageStartReached - Handler for pagination when the end of the oldest messages has been reached.
        onLastVisibleMessageChanged - Handler that notifies us when the user scrolls and the last visible message changes.
        onScrollToBottom - Handler when the user reaches the bottom.
        onGiphyActionClick - Handler when the user clicks on a giphy action such as shuffle, send or cancel.
        onQuotedMessageClick - Handler for quoted message click action.
        onUserAvatarClick - Handler when users avatar is clicked.
        onMessageLinkClick - Handler for clicking on a link in the message.
        onMediaGalleryPreviewResult - Handler when the user selects an option in the Media Gallery Preview screen.
        onMessagesPageEndReached - Handler for pagination when the end of newest messages have been reached.
        onScrollToBottomClicked - Handler when the user requests to scroll to the bottom of the messages list.
        onPauseAudioRecordingAttachments - Handler for lifecycle events.
        loadingContent - Composable that represents the loading content, when we're loading the initial data.
        emptyContent - Composable that represents the empty content if there are no messages.
        helperContent - Composable that, by default, represents the helper content featuring scrolling behavior based on the list state.
        loadingMoreContent - Composable that represents the loading more content, when we're loading the next page.
        itemContent - Composable that represents each item in a list.
      • MessageList

        @Composable() final static Unit MessageList(MessageListState currentState, Arrangement.Vertical verticalArrangement, Arrangement.Vertical threadsVerticalArrangement, ThreadMessagesStart threadMessagesStart, ReactionSorting reactionSorting, Modifier modifier, PaddingValues contentPadding, MessageContentFactory messageContentFactory, MessagesLazyListState messagesLazyListState, Function0<Unit> onMessagesPageStartReached, Function1<Message, Unit> onLastVisibleMessageChanged, Function0<Unit> onScrolledToBottom, 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<Message, Unit> onThreadClick, Function1<Message, Unit> onLongItemClick, Function1<Message, Unit> onReactionsClick, Function1<MediaGalleryPreviewResult, Unit> onMediaGalleryPreviewResult, Function1<GiphyAction, Unit> onGiphyActionClick, Function1<Message, Unit> onQuotedMessageClick, Function1<String, Unit> onMessagesPageEndReached, Function1<Function0<Unit>, Unit> onScrollToBottom, Function0<Unit> onPauseAudioRecordingAttachments, Function1<User, Unit> onUserAvatarClick, Function2<Message, String, Unit> onMessageLinkClick, Function1<User, Unit> onUserMentionClick, Function1<Message, Unit> onReply, Function0<Unit> background, Function0<Unit> loadingContent, Function0<Unit> emptyContent, Function1<BoxScope, Unit> helperContent, Function1<LazyItemScope, Unit> loadingMoreContent, Function3<LazyItemScope, Integer, MessageListItemState, Modifier> itemModifier, Function2<LazyItemScope, MessageListItemState, Unit> itemContent)

        Clean representation of the MessageList that is decoupled from ViewModels. This components allows users to connect the UI to their own data providers, as it relies on pure state.

        Parameters:
        currentState - The state of the component, represented by MessageListState.
        verticalArrangement - Vertical arrangement of the regular message list.
        threadsVerticalArrangement - Vertical arrangement of the thread message list.
        threadMessagesStart - Thread messages start at the bottom or top of the screen.
        reactionSorting - The sorting of the reactions.
        modifier - Modifier for styling.
        contentPadding - Padding values to be applied to the message list surrounding the content inside.
        messagesLazyListState - State of the lazy list that represents the list of messages.
        onMessagesPageStartReached - Handler for pagination.
        onLastVisibleMessageChanged - Handler that notifies us when the user scrolls and the last visible message changes.
        onScrolledToBottom - Handler when the user scrolls to the bottom.
        onThreadClick - Handler for when the user taps on a message with an active thread.
        onLongItemClick - Handler for when the user long taps on an item.
        onReactionsClick - Handler when the user taps on message reactions and selects them.
        onMediaGalleryPreviewResult - Handler when the user selects an option in the Media Gallery Preview screen.
        onGiphyActionClick - Handler when the user clicks on a giphy action such as shuffle, send or cancel.
        onQuotedMessageClick - Handler for quoted message click action.
        onMessagesPageEndReached - Handler for pagination when the end of newest messages have been reached.
        onScrollToBottom - Handler when the user requests to scroll to the bottom of the messages list.
        onPauseAudioRecordingAttachments - Handler for lifecycle events.
        onMessageLinkClick - Handler for clicking on a link in the message.
        background - Composable that represents the background of the message list.
        loadingContent - Composable that represents the loading content, when we're loading the initial data.
        emptyContent - Composable that represents the empty content if there are no messages.
        helperContent - Composable that, by default, represents the helper content featuring scrolling behavior based on the list state.
        loadingMoreContent - Composable that represents the loading more content, when we're loading the next page.
        itemModifier - Modifier for styling the item container.
        itemContent - Composable that represents each item in the list, that the user can override for custom UI and behavior.