ChannelSettingsViewModel

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

The ViewModel class used in ChannelSettingsScreen.

Since

1.0.0

Constructors

Link copied to clipboard
constructor(repository: ChannelSettingsScreenResourceRepository, 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 leaveChannelEventState: StateFlow<SimpleSendbirdEventState>

The StateFlow of the SimpleSendbirdEventState for the leaveChannel request.

Link copied to clipboard

The StateFlow of the SimpleSendbirdEventState for the setMyPushTriggerOption request.

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
open override fun leaveChannel()

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.

Notifies that the setMyPushTriggerOption event has been processed to reset setMyPushTriggerOptionEventState 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
open override fun setMyPushTriggerOption(option: GroupChannel.PushTriggerOption)

Sets the push trigger option for the current user.

Link copied to clipboard
open override fun updateChannel(params: GroupChannelUpdateParams)

Updates the channel description with the given params.

Link copied to clipboard
open override fun updateChannelCover(file: File)

Updates the channel cover image with the given file.

Link copied to clipboard
open override fun updateChannelName(name: String)

Updates the channel name with the given name.