QueryChannelsState

Contains a state related to a single query channels request.

Properties

Link copied to clipboard
abstract val channels: StateFlow<List<Channel>?>

The collection of channels loaded by the query channels request. The StateFlow is initialized with null which means that channels are not loaded yet.

Link copied to clipboard
abstract val channelsStateData: StateFlow<ChannelsStateData>

The channels loaded state. See ChannelsStateData.

Link copied to clipboard

Factory that produces ChatEventHandler, which decides whether the set of channels should be updated.

Link copied to clipboard
abstract val currentRequest: StateFlow<QueryChannelsRequest?>

The request for the current page.

Link copied to clipboard
abstract val endOfChannels: StateFlow<Boolean>

If the current state reached the final page.

Link copied to clipboard
abstract val filter: FilterObject

The filter associated with this query channels state.

Link copied to clipboard
abstract val groupedQueryConfig: StateFlow<GroupedQueryConfig?>

Configuration captured from the most recent grouped query response that targeted this group. Used by paginated and recovery calls so they reuse the caller's original GroupedQueryConfig.limit, GroupedQueryConfig.pageSize, GroupedQueryConfig.watch and GroupedQueryConfig.presence.

Link copied to clipboard
abstract val loading: StateFlow<Boolean>

If the current state is being loaded.

Link copied to clipboard
abstract val loadingMore: StateFlow<Boolean>

If the current state is loading more channels (a next page is being loaded).

Link copied to clipboard
abstract val nextCursor: StateFlow<String?>

Cursor for the next page when this state belongs to a grouped query. null means there is no further page (or that this is a standard query that doesn't use cursors).

Link copied to clipboard
abstract val nextPageRequest: StateFlow<QueryChannelsRequest?>

The request for the next page, if there is a page.

Link copied to clipboard
abstract val recoveryNeeded: StateFlow<Boolean>

If the channels need to be synced.

Link copied to clipboard
abstract val sort: QuerySorter<Channel>

The sort associated with this query channels state.