MembersViewModel

class MembersViewModel(repository: MembersScreenResourceRepository, savedStateHandle: SavedStateHandle) : ViewModel, MembersViewModelContract

ViewModel class for MembersScreen.

Since

1.0.0

Constructors

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

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val channelState: StateFlow<UikitGroupChannel>

The StateFlow of the UikitGroupChannel.

Link copied to clipboard
open override val loadMoreEventState: StateFlow<SimpleSendbirdEventState>

The StateFlow of the SimpleSendbirdEventState for the loadMore request.

Link copied to clipboard
open override val membersState: StateFlow<List<UikitMember>>

The StateFlow of the list of UikitMember.

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

The StateFlow of the SendbirdScreenUiState.

Functions

Link copied to clipboard
open override fun loadMore()

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

Link copied to clipboard
open override fun notifyLoadNextEventStateIdle()

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

Link copied to clipboard
@VisibleForTesting(otherwise = 4)
open override fun onCleared()
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.