MessageListState

data class MessageListState(val messageItems: List<MessageListItemState> = emptyList(), val endOfNewMessagesReached: Boolean = true, val endOfOldMessagesReached: Boolean = false, val isLoading: Boolean = false, val isLoadingNewerMessages: Boolean = false, val isLoadingOlderMessages: Boolean = false, val currentUser: User? = User(), val parentMessageId: String? = null, val unreadCount: Int = 0, val newMessageState: NewMessageState? = null, val selectedMessageState: SelectedMessageState? = null, val unreadLabel: UnreadLabel? = null)

Holds the state of the messages list screen.

Parameters

messageItems

The list of MessageListItemStates to be shown in the list.

endOfNewMessagesReached

Whether the user has reached the newest message or not.

endOfOldMessagesReached

Whether the user has reached the older message or not.

isLoading

Whether the initial loading is in progress or not.

isLoadingNewerMessages

Whether loading of a page with newer messages is in progress or not.

isLoadingOlderMessages

Whether loading of a page with older messages is in progress or not.

currentUser

The current logged in User.

parentMessageId

The Message id if we are in a thread, null otherwise.

unreadCount

Count of unread messages in channel or thread.

newMessageState

The NewMessageState of the newly received message.

selectedMessageState
unreadLabel

Snapshot of the active unread label, or null when there is no unread boundary to display. Sticky once set: it persists across auto-read events until the user leaves the channel, marks messages unread, or explicitly hides it.

Constructors

Link copied to clipboard
constructor(messageItems: List<MessageListItemState> = emptyList(), endOfNewMessagesReached: Boolean = true, endOfOldMessagesReached: Boolean = false, isLoading: Boolean = false, isLoadingNewerMessages: Boolean = false, isLoadingOlderMessages: Boolean = false, currentUser: User? = User(), parentMessageId: String? = null, unreadCount: Int = 0, newMessageState: NewMessageState? = null, selectedMessageState: SelectedMessageState? = null, unreadLabel: UnreadLabel? = 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