ChannelListViewModel

constructor(filter: FilterObject? = null, sort: QuerySorter<Channel> = DEFAULT_SORT, limit: Int = DEFAULT_CHANNEL_LIMIT, messageLimit: Int? = null, memberLimit: Int? = null, isDraftMessagesEnabled: Boolean, chatEventHandlerFactory: ChatEventHandlerFactory = ChatEventHandlerFactory(), chatClient: ChatClient = ChatClient.instance(), globalState: Flow<GlobalState> = chatClient.globalStateFlow)

Parameters

filter

Filter for querying channels, should never be empty.

sort

Defines the ordering of the channels.

limit

The maximum number of channels to fetch.

messageLimit

The number of messages to fetch for each channel. When null, the server-side default is used.

memberLimit

The number of members to fetch per channel. When null, the server-side default is used.

isDraftMessagesEnabled

Enables or disables draft messages.

chatEventHandlerFactory

The instance of ChatEventHandlerFactory that will be used to create ChatEventHandler.

chatClient

Entry point for all low-level operations.

globalState

A flow emitting the current GlobalState.