MessagesState

@Immutable
sealed class MessagesState

Represents of possible state of messages for ChannelState.

Inheritors

Types

Link copied to clipboard
@Immutable
data object Loading : MessagesState

Indicates we are loading the first page of results. We are in this state if ChannelState.loading is true For seeing if we're loading more results have a look at loadingNewerMessages and loadingOlderMessages

Link copied to clipboard
@Immutable
data object NoQueryActive : MessagesState

The ChannelState is initialized but no query is currently running. If you know that a query will be started you typically want to display a loading icon.

Link copied to clipboard
@Immutable
data object OfflineNoResults : MessagesState

If we are offline and don't have channels stored in offline storage, typically displayed as an error condition.

Link copied to clipboard
@Immutable
data class Result(val messages: List<Message>) : MessagesState

The list of messages, loaded either from offline storage or an API call. Observe chatDomain.online to know if results are currently up to date