UserInvitationViewModel

class UserInvitationViewModel(repository: UserInvitationScreenResourceRepository, savedStateHandle: SavedStateHandle) : ViewModel, SendbirdViewModelContract

ViewModel class for UserInvitationScreen.

Since

1.0.0-beta.1

Constructors

Link copied to clipboard
constructor(repository: UserInvitationScreenResourceRepository, savedStateHandle: SavedStateHandle)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The StateFlow of the UikitGroupChannel.

Link copied to clipboard

The StateFlow of the SimpleSendbirdEventState for the invite request.

Link copied to clipboard

The StateFlow of the SimpleSendbirdEventState for the loadMore request.

Link copied to clipboard
open override val uiState: StateFlow<SendbirdScreenUiState>

The StateFlow of the SendbirdScreenUiState.

Link copied to clipboard
val userListState: StateFlow<List<UikitUser>>

The StateFlow of the list of UikitUser.

Functions

Link copied to clipboard
fun invite(userIds: List<String>)

Requests to invite users to the channel. The result will be notified by inviteEventState.

Link copied to clipboard
fun loadMore()

Requests to load more users. This should be called when the user list scrolls to the bottom and requires more users.

Link copied to clipboard

Notifies that the invite event has been processed to reset inviteEventState to SendbirdEventState.Idle state.

Link copied to clipboard

Notifies that the loadMore event has been processed to reset loadMoreEventState to SendbirdEventState.Idle state.

Link copied to clipboard
open override fun prepare()

The preparation process required for the screen. This contains the Chat SDK's connection by SendbirdChat.connect and getting the channel object ready if necessary.