ChannelSettingsScreen

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.

Since

1.0.0

Parameters

channelUrl

The url of the channel to display the settings for.

modifier

The modifier to be applied to the view.

onTopBarNavigationIconClick

The handler for when the top bar navigation icon is clicked.

onTopBarActionClick

The handler for when the top bar action is clicked.

onChannelRemoved

The handler for when the channel is removed.

onMembersMenuClick

The handler for when the members menu is clicked.

viewModelContract

The ChannelSettingsViewModelContract to handle the business logic.

dialogState

The state of the dialog to display.

topBar

The top bar composable to be displayed. Defaults to ChannelSettingsTopBar.

loading

The loading composable to be displayed. Defaults to LoadingScreen.

failure

The failure composable to be displayed. Defaults to FailurePlaceholder.

notificationMenu

The notification menu composable to be displayed. Defaults to ChannelSettingsNotificationMenu.

membersMenu

The members menu composable to be displayed. Defaults to ChannelSettingsMemberMenu.

leaveChannelMenu

The leave channel menu composable to be displayed. Defaults to ChannelSettingsLeaveChannelMenu.

See also