Class MessageListState
-
- All Implemented Interfaces:
public final class MessageListStateHolds the state of the messages list screen.
-
-
Field Summary
Fields Modifier and Type Field Description private final List<MessageListItemState>messageItemsprivate final BooleanendOfNewMessagesReachedprivate final BooleanendOfOldMessagesReachedprivate final BooleanisLoadingprivate final BooleanisLoadingNewerMessagesprivate final BooleanisLoadingOlderMessagesprivate final UsercurrentUserprivate final StringparentMessageIdprivate final IntegerunreadCountprivate final NewMessageStatenewMessageStateprivate final SelectedMessageStateselectedMessageState
-
Constructor Summary
Constructors Constructor Description MessageListState(List<MessageListItemState> messageItems, Boolean endOfNewMessagesReached, Boolean endOfOldMessagesReached, Boolean isLoading, Boolean isLoadingNewerMessages, Boolean isLoadingOlderMessages, User currentUser, String parentMessageId, Integer unreadCount, NewMessageState newMessageState, SelectedMessageState selectedMessageState)
-
Method Summary
Modifier and Type Method Description final List<MessageListItemState>getMessageItems()final BooleangetEndOfNewMessagesReached()final BooleangetEndOfOldMessagesReached()final BooleanisLoading()final BooleanisLoadingNewerMessages()final BooleanisLoadingOlderMessages()final UsergetCurrentUser()final StringgetParentMessageId()final IntegergetUnreadCount()final NewMessageStategetNewMessageState()final SelectedMessageStategetSelectedMessageState()-
-
Constructor Detail
-
MessageListState
MessageListState(List<MessageListItemState> messageItems, Boolean endOfNewMessagesReached, Boolean endOfOldMessagesReached, Boolean isLoading, Boolean isLoadingNewerMessages, Boolean isLoadingOlderMessages, User currentUser, String parentMessageId, Integer unreadCount, NewMessageState newMessageState, SelectedMessageState selectedMessageState)
- 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- The current SelectedMessageState.
-
-
Method Detail
-
getMessageItems
final List<MessageListItemState> getMessageItems()
-
getEndOfNewMessagesReached
final Boolean getEndOfNewMessagesReached()
-
getEndOfOldMessagesReached
final Boolean getEndOfOldMessagesReached()
-
isLoadingNewerMessages
final Boolean isLoadingNewerMessages()
-
isLoadingOlderMessages
final Boolean isLoadingOlderMessages()
-
getCurrentUser
final User getCurrentUser()
-
getParentMessageId
final String getParentMessageId()
-
getUnreadCount
final Integer getUnreadCount()
-
getNewMessageState
final NewMessageState getNewMessageState()
-
getSelectedMessageState
final SelectedMessageState getSelectedMessageState()
-
-
-
-