Package 

Class AddMembersViewController


  • 
    public final class AddMembersViewController
    
                        

    Controller responsible for managing the state and actions related to adding members to a channel.

    It provides functionality to search for users, select/deselect them, and paginate results. Adding the selected members to the channel is delegated to the parent (e.g. ChannelInfoViewController).

    • Constructor Summary

      Constructors 
      Constructor Description
      AddMembersViewController(CoroutineScope scope, Integer resultLimit, ChatClient chatClient, Flow<ChannelState> channelState)
    • Method Summary

      Modifier and Type Method Description
      final StateFlow<AddMembersViewState> getState() A StateFlow representing the current state of the "Add Members" view.
      final Unit onViewAction(AddMembersViewAction action) Handles actions dispatched from the "Add Members" view.
      • Methods inherited from class java.lang.Object

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

      • AddMembersViewController

        AddMembersViewController(CoroutineScope scope, Integer resultLimit, ChatClient chatClient, Flow<ChannelState> channelState)
        Parameters:
        scope - The CoroutineScope used for launching coroutines.
        resultLimit - The maximum number of search results per page.
        chatClient - The ChatClient instance used for interacting with the chat API.
        channelState - A Flow representing the live state of the channel, used to keep track of current members reactively so that the list remains accurate when the sheet is re-opened.