MessageItemState
data class MessageItemState(val message: Message = Message(), val parentMessageId: String? = null, val isMine: Boolean = false, val isInThread: Boolean = false, val showMessageFooter: Boolean = false, val currentUser: User? = null, val groupPosition: List<MessagePosition> = listOf(MessagePosition.NONE), val isMessageRead: Boolean = false, val deletedMessageVisibility: DeletedMessageVisibility = DeletedMessageVisibility.ALWAYS_HIDDEN, val focusState: MessageFocusState? = null, val messageReadBy: List<ChannelUserRead> = emptyList()) : HasMessageListItemState
Represents a message item inside the messages list.
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.
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.
Constructors
Link copied to clipboard
constructor(message: Message = Message(), parentMessageId: String? = null, isMine: Boolean = false, isInThread: Boolean = false, showMessageFooter: Boolean = false, currentUser: User? = null, groupPosition: List<MessagePosition> = listOf(MessagePosition.NONE), isMessageRead: Boolean = false, deletedMessageVisibility: DeletedMessageVisibility = DeletedMessageVisibility.ALWAYS_HIDDEN, focusState: MessageFocusState? = null, messageReadBy: List<ChannelUserRead> = emptyList())
Properties
Inherited functions
Link copied to clipboard
Returns a string representation of the MessageListItemState.