Package 

Class ChannelListViewModel


  • 
    public final class ChannelListViewModel
    extends ViewModel
                        

    ViewModel class for ChannelListView. Responsible for keeping the channels list up to date. Can be bound to the view using ChannelListViewModel.bindView function.

    • Constructor Detail

      • ChannelListViewModel

        ChannelListViewModel(FilterObject filter, QuerySorter<Channel> sort, Integer limit, Integer messageLimit, Integer memberLimit, Boolean isDraftMessagesEnabled, ChatEventHandlerFactory chatEventHandlerFactory, ChatClient chatClient, Flow<GlobalState> globalState)
        Creates a view model that queries channels by an explicit filter and sort.
        Parameters:
        filter - Filter for querying channels.
        sort - Defines the ordering of the channels.
      • ChannelListViewModel

        ChannelListViewModel(String predefinedFilterName, Map<String, Object> filterValues, Map<String, Object> sortValues, Integer limit, Integer messageLimit, Integer memberLimit, Boolean isDraftMessagesEnabled, ChatEventHandlerFactory chatEventHandlerFactory, ChatClient chatClient, Flow<GlobalState> globalState)
        Creates a view model that queries channels using a predefined filter resolved by the server.
        Parameters:
        predefinedFilterName - The name of the predefined filter registered on the backend.
        filterValues - Optional values interpolated into the predefined filter template.
        sortValues - Optional values interpolated into the predefined sort template.