ChannelSettingsViewModel

class ChannelSettingsViewModel(repository: ChannelSettingsScreenResourceRepository, savedStateHandle: SavedStateHandle) : ViewModel, SendbirdViewModelContract

The ViewModel class used in ChannelSettingsScreen.

Since

1.0.0-beta.1

Constructors

Link copied to clipboard
constructor(repository: ChannelSettingsScreenResourceRepository, 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 leaveChannel request.

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

The StateFlow of the SendbirdScreenUiState.

Link copied to clipboard

The StateFlow of the SimpleSendbirdEventState for the updateChannel request.

Functions

Link copied to clipboard

Leaves the current channel. The result will be notified by leaveChannelEventState.

Link copied to clipboard

Notifies that the leaveChannel event has been processed to reset leaveChannelEventState to SendbirdEventState.Idle state.

Link copied to clipboard

Notifies that the updateChannel event has been processed to reset updateChannelEventState 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.

Link copied to clipboard
fun setMyPushTriggerOption(option: GroupChannel.PushTriggerOption)

Sets the push trigger option for the current user.

Link copied to clipboard
fun updateChannel(params: GroupChannelUpdateParams)

Updates the channel description with the given params.

Link copied to clipboard

Updates the channel cover image with the given file.

Link copied to clipboard

Updates the channel name with the given name.