Package 

Class MentionListViewModel


  • 
    public final class MentionListViewModel
    extends ViewModel
                        

    ViewModel class responsible for managing the MentionListState and actions of mention list.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final StateFlow<MentionListState> state
      private final SharedFlow<MentionListEvent> events
    • Constructor Summary

      Constructors 
      Constructor Description
      MentionListViewModel(QuerySorter<Message> sort, Function1<ViewModel, MentionListController> controllerProvider)
    • Method Summary

      Modifier and Type Method Description
      final StateFlow<MentionListState> getState()
      final SharedFlow<MentionListEvent> getEvents()
      final Unit loadMore() Loads more messages if there are more messages to load.
      final Unit refresh()
      • Methods inherited from class io.getstream.chat.android.compose.viewmodel.mentions.MentionListViewModel

        addCloseable, addCloseable, addCloseable, getCloseable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MentionListViewModel

        MentionListViewModel(QuerySorter<Message> sort, Function1<ViewModel, MentionListController> controllerProvider)
        Parameters:
        sort - The sorting options for the messages.
        controllerProvider - The provider for MentionListController which handles the business logic of the mention list.
    • Method Detail

      • getState

         final StateFlow<MentionListState> getState()
      • getEvents

         final SharedFlow<MentionListEvent> getEvents()
      • loadMore

         final Unit loadMore()

        Loads more messages if there are more messages to load.