-
public final class MessageItemState extends HasMessageListItemState
Represents a message item inside the messages list.
-
-
Field Summary
Fields Modifier and Type Field Description private final Messagemessageprivate final StringparentMessageIdprivate final BooleanisMineprivate final BooleanisInThreadprivate final BooleanshowMessageFooterprivate final UsercurrentUserprivate final List<MessagePosition>groupPositionprivate final BooleanisMessageReadprivate final BooleanisMessageDeliveredprivate final DeletedMessageVisibilitydeletedMessageVisibilityprivate final MessageFocusStatefocusStateprivate final List<ChannelUserRead>messageReadByprivate final BooleanshowOriginalTextprivate final Set<String>ownCapabilitiesprivate final Stringid
-
Constructor Summary
Constructors Constructor Description MessageItemState(Message message, String parentMessageId, Boolean isMine, Boolean isInThread, Boolean showMessageFooter, User currentUser, List<MessagePosition> groupPosition, Boolean isMessageRead, Boolean isMessageDelivered, DeletedMessageVisibility deletedMessageVisibility, MessageFocusState focusState, List<ChannelUserRead> messageReadBy, Boolean showOriginalText, Set<String> ownCapabilities)
-
Method Summary
Modifier and Type Method Description MessagegetMessage()final StringgetParentMessageId()final BooleangetIsMine()final BooleangetIsInThread()final BooleangetShowMessageFooter()final UsergetCurrentUser()final List<MessagePosition>getGroupPosition()final BooleangetIsMessageRead()final BooleangetIsMessageDelivered()final DeletedMessageVisibilitygetDeletedMessageVisibility()final MessageFocusStategetFocusState()final List<ChannelUserRead>getMessageReadBy()final BooleangetShowOriginalText()final Set<String>getOwnCapabilities()final StringgetId()-
-
Constructor Detail
-
MessageItemState
MessageItemState(Message message, String parentMessageId, Boolean isMine, Boolean isInThread, Boolean showMessageFooter, User currentUser, List<MessagePosition> groupPosition, Boolean isMessageRead, Boolean isMessageDelivered, DeletedMessageVisibility deletedMessageVisibility, MessageFocusState focusState, List<ChannelUserRead> messageReadBy, Boolean showOriginalText, Set<String> ownCapabilities)
- Parameters:
message- The Message to show in the list.parentMessageId- The id of the parent Message if the message is inside a thread.isMine- Whether the message is sent by the current user or not.isInThread- Whether the message is inside a thread or not.showMessageFooter- Whether we need to show the message footer or not.currentUser- The currently logged in user.groupPosition- The MessagePosition of the item inside a group.isMessageRead- Whether the message has been read or not.isMessageDelivered- Whether the message has been delivered or not.deletedMessageVisibility- The DeletedMessageVisibility which determines the visibility of deleted messages in the UI.focusState- The current MessageFocusState of the message, used to focus the message in the ui.messageReadBy- The list of ChannelUserRead for the message.showOriginalText- If the original text of the message should be shown in the UI instead of its translation (if the message was auto-translated).ownCapabilities- The capabilities of the current user in the channel.
-
-
Method Detail
-
getMessage
Message getMessage()
-
getParentMessageId
final String getParentMessageId()
-
getIsInThread
final Boolean getIsInThread()
-
getShowMessageFooter
final Boolean getShowMessageFooter()
-
getCurrentUser
final User getCurrentUser()
-
getGroupPosition
final List<MessagePosition> getGroupPosition()
-
getIsMessageRead
final Boolean getIsMessageRead()
-
getIsMessageDelivered
final Boolean getIsMessageDelivered()
-
getDeletedMessageVisibility
final DeletedMessageVisibility getDeletedMessageVisibility()
-
getFocusState
final MessageFocusState getFocusState()
-
getMessageReadBy
final List<ChannelUserRead> getMessageReadBy()
-
getShowOriginalText
final Boolean getShowOriginalText()
-
getOwnCapabilities
final Set<String> getOwnCapabilities()
-
-
-
-