ChannelListViewModelFactory

class ChannelListViewModelFactory @JvmOverloads constructor(filter: FilterObject? = null, sort: QuerySorter<Channel> = ChannelListViewModel.DEFAULT_SORT, limit: Int = ChannelListViewModel.DEFAULT_CHANNEL_LIMIT, messageLimit: Int = ChannelListViewModel.DEFAULT_MESSAGE_LIMIT, memberLimit: Int = ChannelListViewModel.DEFAULT_MEMBER_LIMIT, 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.

messageLimit

The number of messages to fetch for each channel.

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 = ChannelListViewModel.DEFAULT_MESSAGE_LIMIT, memberLimit: Int = ChannelListViewModel.DEFAULT_MEMBER_LIMIT, chatEventHandlerFactory: ChatEventHandlerFactory = ChatEventHandlerFactory())

Types

Link copied to clipboard
class Builder constructor

Functions

Link copied to clipboard
open override fun <T : ViewModel> create(modelClass: Class<T>): T

Returns an instance of ChannelListViewModel.

Inherited functions

Link copied to clipboard
open fun <T : ViewModel> create(modelClass: Class<T>, extras: CreationExtras): T