ChannelListSearchOptions

Builds the filters and sort that ChannelListViewModel uses to search channels and messages.

Extend this class and override the functions you want to change. Each default implementation returns the filter or sort the view model uses when no options are provided.

The functions are called on the main thread when a search request is built, so they must return quickly and must not block. They are called again for the next page of a message search, and for the next page of a channel search in a channel list created with a filter. In a channel list that uses a predefined filter or a channel group, the next page of a channel search reuses the filter and sort of the first page.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
data class ChannelSearchParams(val query: String, val currentUser: User?, val listFilter: FilterObject?, val listSort: QuerySorter<Channel>?)

The state of a channel search.

Link copied to clipboard
data class MessageSearchParams(val query: String, val currentUser: User?, val listFilter: FilterObject?)

The state of a message search.

Functions

Link copied to clipboard

Returns the filter used to query channels while a channel search is active.

Link copied to clipboard

Returns the sort used to query channels while a channel search is active.

Link copied to clipboard

Returns the filter that selects the channels in which messages are searched.

Link copied to clipboard

Returns the filter that messages must match to be part of the message search results.

Link copied to clipboard

Returns the sort of the message search results.