ChannelListViewModel
ViewModel class for ChannelListView. Responsible for keeping the channels list up to date. Can be bound to the view using ChannelListViewModel.bindView function.
Parameters
The maximum number of channels to fetch.
The number of messages to fetch for each channel. When null, the server-side default is used.
The number of members to fetch per channel. When null, the server-side default is used.
Enables or disables draft messages.
The instance of ChatEventHandlerFactory that will be used to create ChatEventHandler.
Entry point for all low-level operations.
A flow emitting the current GlobalState.
Constructors
Creates a view model that queries channels by an explicit filter and sort.
Creates a view model that queries channels using a predefined filter resolved by the server.
Types
Properties
Draft messages for channels.
Emits error events.
Represents the current pagination state by containing information about the loading state and if we have reached the end of all available channels.
Represents the current state containing channel list information.
Updates about currently typing users in active channels.
Functions
Binds ChannelListView with ChannelListViewModel, updating the view's state based on data provided by the ViewModel, and propagating view events to the ViewModel as needed.
Deletes a channel.
Removes the current user from the channel.
Marks all of the channels as read.
Checks against available actions and creates side-effects accordingly.
Allows us to change the filter based on our requirements.