State

data class State(val query: String = "", val canLoadMore: Boolean = true, val results: List<MessageResult> = emptyList(), val isLoading: Boolean = false, val isLoadingMore: Boolean = false)

Represents the search screen state, used to render the required UI.

Parameters

query

The current search query value.

results

The found messages to render.

canLoadMore

If we've reached the end of messages, to stop triggering pagination.

isLoading

If we're currently loading data (initial load).

isLoadingMore

If we're loading more items (pagination).

Constructors

Link copied to clipboard
constructor(query: String = "", canLoadMore: Boolean = true, results: List<MessageResult> = emptyList(), isLoading: Boolean = false, isLoadingMore: Boolean = false)

Properties

Link copied to clipboard
val canLoadMore: Boolean = true
Link copied to clipboard
val isLoading: Boolean = false
Link copied to clipboard
val isLoadingMore: Boolean = false
Link copied to clipboard
Link copied to clipboard