Package-level declarations

Types

Link copied to clipboard

Represents the state of the channel settings edit dialog.

Link copied to clipboard
class ChannelSettingsViewModel(repository: ChannelSettingsScreenResourceRepository, savedStateHandle: SavedStateHandle) : ViewModel, ChannelSettingsViewModelContract

The ViewModel class used in ChannelSettingsScreen.

Link copied to clipboard
Link copied to clipboard

Represents the parameters for ChannelSettingsViewModel.

Link copied to clipboard

Represents the contract to handle the channel cover edit dialog click actions.

Link copied to clipboard

Represents the state of the dialog for channel settings.

Functions

Link copied to clipboard
fun ChannelCoverEditDialog(channelCoverEditDialogContract: ChannelCoverEditDialogContract, modifier: Modifier = Modifier, menus: @Composable (ChannelCoverEditDialogContract) -> List<DialogMenuDetail> = { contract -> SendbirdDialogDefaults.channelCoverEditMenuItems(contract) }, onItemClick: (DialogMenuDetail) -> Unit = {}, onDismissRequest: () -> Unit = {})

Represents the dialog for channel cover edit.

Link copied to clipboard
fun ChannelEditBottomSheet(channelEditBottomSheetContract: ChannelEditBottomSheetContract, modifier: Modifier = Modifier, menus: @Composable (ChannelEditBottomSheetContract) -> List<DialogMenuDetail> = { contract -> SendbirdDialogDefaults.channelEditMenuItems(contract) }, onItemClick: (DialogMenuDetail) -> Unit = {}, onDismissRequest: () -> Unit = {})

Represents the bottom sheet for channel edit.

Link copied to clipboard
fun ChannelNameEditDialog(inputValue: String, onInputValueChange: (String) -> Unit, onPositiveButtonClick: () -> Unit = {}, onNegativeButtonClick: () -> Unit = {}, onDismissRequest: () -> Unit = {})
Link copied to clipboard
fun ChannelSettingsInfo(title: String, imageModels: List<ImageModel>, modifier: Modifier = Modifier)

Represents the channel settings info that displays the title and the image.

Link copied to clipboard
fun ChannelSettingsLeaveChannelMenu(modifier: Modifier = Modifier, onClick: () -> Unit = {})

Represents the channel settings menu to leave the channel.

Link copied to clipboard
fun ChannelSettingsMemberMenu(memberCount: Int, modifier: Modifier = Modifier, onClick: () -> Unit = {})

Represents the channel settings menu to view the members of the channel.

Link copied to clipboard
fun ChannelSettingsMenu(icon: Painter, iconTint: Color, text: String, modifier: Modifier = Modifier, action: @Composable RowScope.() -> Unit = {})

Represents the channel settings menu that displays the icon, text, and action.

Link copied to clipboard
fun ChannelSettingsNotificationMenu(isChecked: Boolean, modifier: Modifier = Modifier, onCheckedChange: (Boolean) -> Unit = {})

Represents the channel settings menu for the notification settings.

Link copied to clipboard
fun ChannelSettingsScreen(navController: NavController?, channelUrl: String, modifier: Modifier = Modifier, onTopBarNavigationIconClick: () -> Unit = { navController?.popBackStack() }, onTopBarActionClick: (channelSettingsDialogState: ChannelSettingsDialogState) -> Unit = { channelSettingsDialogState -> channelSettingsDialogState.showChannelEditDialog() }, onChannelRemoved: (String) -> Unit = { navController?.popBackStack(SendbirdNavigationRoute.Channels.route, inclusive = false) }, onMembersMenuClick: () -> Unit = { navController?.navigateToMembers(channelUrl) }, viewModelContract: ChannelSettingsViewModelContract = viewModel<ChannelSettingsViewModel>( factory = ChannelSettingsViewModel.factory( ChannelSettingsViewModelParams(channelUrl) ) ), dialogState: ChannelSettingsDialogState = rememberChannelSettingsDialogState(), snackbarHostState: SnackbarHostState = remember { SnackbarHostState() }, channelEditBottomSheet: @Composable (ChannelSettingsDialogState) -> Unit = { channelSettingsDialogState -> ChannelEditBottomSheet( channelEditBottomSheetContract = DefaultChannelEditBottomSheetContract(channelSettingsDialogState), onItemClick = { it.onClick() }, onDismissRequest = { channelSettingsDialogState.dismissChannelEditDialog() } ) }, channelCoverEditDialog: @Composable (CameraCapturerState, ImagePickerState) -> Unit = { cameraCapturerState, imagePickerState -> ChannelCoverEditDialog( channelCoverEditDialogContract = DefaultChannelCoverEditDialogContract(cameraCapturerState, imagePickerState), onItemClick = { it.onClick() }, onDismissRequest = { dialogState.dismissChannelCoverEditDialog() } ) }, topBar: @Composable (onNavigationIconClick: () -> Unit, onActionClick: () -> Unit) -> Unit = { onNavigationIconClick, onActionClick -> ChannelSettingsTopBar( onNavigationIconClick = onNavigationIconClick, onActionClick = onActionClick ) }, loading: @Composable () -> Unit = { LoadingScreen() }, failure: @Composable (e: Throwable) -> Unit = { e -> FailurePlaceholder( onRetryClick = { viewModelContract.prepare() } ) }, notificationMenu: @Composable (isChecked: Boolean, onCheckedChange: (Boolean) -> Unit) -> Unit = { isChecked, onCheckedChange -> Column { ChannelSettingsNotificationMenu(isChecked = isChecked, onCheckedChange = onCheckedChange) SettingsMenuDivider() } }, membersMenu: @Composable (memberCount: Int, onClick: () -> Unit) -> Unit = { memberCount, onClick -> Column { ChannelSettingsMemberMenu(memberCount = memberCount, onClick = onClick) SettingsMenuDivider() } }, leaveChannelMenu: @Composable (onClick: () -> Unit) -> Unit = { onClick -> Column { ChannelSettingsLeaveChannelMenu( onClick = onClick ) SettingsMenuDivider() } })

Represents the screen for channel settings.

Link copied to clipboard
fun ChannelSettingsTopBar(modifier: Modifier = Modifier, onNavigationIconClick: () -> Unit = {}, onActionClick: () -> Unit = {}, title: @Composable () -> Unit = { TopBarTitleText( stringResource(id = R.string.sb_text_header_channel_settings), modifier = Modifier.padding(12.dp) ) }, navigationIcon: @Composable () -> Unit = { BackButton(onClick = onNavigationIconClick) }, action: @Composable () -> Unit = { SendbirdTextButton( text = stringResource(id = R.string.sb_text_button_edit), onClick = onActionClick ) })

The top bar for the ChannelSettingsScreen.

Link copied to clipboard
Link copied to clipboard
fun SettingsMenu(modifier: Modifier = Modifier, icon: Painter? = null, iconTint: Color = LocalContentColor.current, iconSize: Dp = 24.dp, text: String? = null, textPaddingValues: PaddingValues = PaddingValues(horizontal = 16.dp), action: @Composable RowScope.() -> Unit = {})

Represents the settings menu that displays the icon, text, and action.