ChannelListViewModelFactory
class ChannelListViewModelFactory @JvmOverloads constructor(filter: FilterObject? = null, sort: QuerySorter<Channel> = ChannelListViewModel.DEFAULT_SORT, limit: Int = ChannelListViewModel.DEFAULT_CHANNEL_LIMIT, messageLimit: Int? = null, memberLimit: Int? = null, isDraftMessagesEnabled: Boolean = ChatUI.draftMessagesEnabled, chatEventHandlerFactory: ChatEventHandlerFactory = ChatEventHandlerFactory()) : ViewModelProvider.Factory
Creates a channels view model factory.
Parameters
filter
How to filter the channels.
sort
How to sort the channels, defaults to last_updated.
limit
How many channels to return.
memberLimit
The number of members per channel. When null, the server-side default is used.
messageLimit
The number of messages to fetch for each 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.
See also
Constructors
Link copied to clipboard
constructor(filter: FilterObject? = null, sort: QuerySorter<Channel> = ChannelListViewModel.DEFAULT_SORT, limit: Int = ChannelListViewModel.DEFAULT_CHANNEL_LIMIT, messageLimit: Int? = null, memberLimit: Int? = null, isDraftMessagesEnabled: Boolean = ChatUI.draftMessagesEnabled, chatEventHandlerFactory: ChatEventHandlerFactory = ChatEventHandlerFactory())