MessageCenterListState

State holder for the Message Center list screen.

Properties

Link copied to clipboard

Whether every message in the list is selected.

Link copied to clipboard

The ID of the highlighted message, if any.

Link copied to clipboard

Whether the list is in editing mode.

Link copied to clipboard

Whether the list failed to load.

Link copied to clipboard

Whether the list is loading for the first time.

Link copied to clipboard

Whether the list is refreshing while displaying content.

Link copied to clipboard

The list of messages when in content state, or an empty list otherwise.

Link copied to clipboard

The IDs of the messages selected in editing mode.

Functions

Link copied to clipboard
fun delete(messageIds: Set<String>)

Deletes the messages with the given messageIds.

Link copied to clipboard

Deletes the messages selected in editing mode.

Link copied to clipboard
fun markRead(messageIds: Set<String>)

Marks the messages with the given messageIds as read.

Link copied to clipboard

Marks the messages selected in editing mode as read.

Link copied to clipboard
fun refresh(onRefreshed: () -> Unit = {})

Refreshes the message list.

Link copied to clipboard
fun selectAll()

Selects every message in the list.

Link copied to clipboard

Clears the selection.

Link copied to clipboard
fun setEditing(isEditing: Boolean)

Enters or exits editing mode. Exiting clears the selection.

Link copied to clipboard
fun setHighlighted(messageId: String?)

Sets the highlighted message, or clears it if messageId is null.

Link copied to clipboard
fun setSelected(messageId: String, isSelected: Boolean)

Selects or deselects the message with the given messageId in editing mode.