Filter message list
You can statically filter messages when retrieving a message. Currently, dynamic filtering is not supported. To change the filtering criteria, you must recreate the channel.
Set MessageListParams directly when creating a ViewModel
The ChannelViewModel
is responsible for fetching and managing messages from a channel. You can filter these messages by changing the properties of MessageListParams
within the ChannelViewModel
. See this page if you need help with customizing a ViewModel.
You can inherit from ChannelViewModel
and implement the createMessageListParams()
method. When you call the super.createMessageListParams()
method, you can then obtain the default params
setting used by the UIKit.
Set MessageListParams through fragment builder
The fragment builder also provides an interface to customize the MessageListParams
. In this case, however, the default setting used by the UIKit can't be retrieved.
For an in-depth practical demonstration, see our sample code.