-
public final class AddMembersViewControllerController 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).
-
-
Field Summary
Fields Modifier and Type Field Description private final StateFlow<AddMembersViewState>state
-
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 UnitonViewAction(AddMembersViewAction action)Handles actions dispatched from the "Add Members" view. -
-
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.
-
-
Method Detail
-
getState
final StateFlow<AddMembersViewState> getState()
A StateFlow representing the current state of the "Add Members" view.
-
onViewAction
final Unit onViewAction(AddMembersViewAction action)
Handles actions dispatched from the "Add Members" view.
- Parameters:
action- The AddMembersViewAction to handle.
-
-
-
-