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)

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

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)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val isLoading: Boolean = false
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val parentMessageId: String? = null
Link copied to clipboard
Link copied to clipboard
val unreadCount: Int = 0