fun ChannelCreationScreen(navController: NavController?, modifier: Modifier = Modifier, channelCreationScreenState: ChannelCreationScreenState = rememberChannelCreationScreenState(), snackbarHostState: SnackbarHostState = remember { SnackbarHostState() }, viewModelContract: ChannelCreationViewModelContract = viewModel<ChannelCreationViewModel>(
factory = ChannelCreationViewModel.factory()
), onTopBarNavigationIconClick: () -> Unit = { navController?.popBackStack() }, onTopBarActionClick: (ChannelCreationScreenState, ChannelCreationTopBarActionContract) -> Unit = { state, topBarActionContract ->
topBarActionContract.createChannel(state.selectedUserIds)
}, onChannelCreated: (channel: UikitGroupChannel) -> Unit = { channel ->
navController?.popBackStack()
navController?.navigateToChannel(channel.channelUrl)
}, topBar: @Composable (selectedUserCount: Int, onNavigationIconClick: () -> Unit, onActionClick: () -> Unit) -> Unit = { selectedUserCount, onNavigationIconClick, onActionClick ->
ChannelCreationTopBar(
selectedUserCount,
onNavigationIconClick = onNavigationIconClick,
onActionClick = onActionClick
)
}, loading: @Composable () -> Unit = {
LoadingScreen()
}, failure: @Composable (e: Throwable) -> Unit = {
FailurePlaceholder(
onRetryClick = { viewModelContract.prepare() }
)
}, empty: @Composable () -> Unit = {
ScreenPlaceholder(
icon = painterResource(id = R.drawable.icon_members),
text = stringResource(id = R.string.sb_text_user_list_empty)
)
}, userItem: @Composable (user: UikitUser, isSelected: Boolean, onCheckedChange: (user: UikitUser) -> Unit) -> Unit = { user, isSelected, onCheckedChange ->
ChannelCreationItem(
user,
isSelected
) {
onCheckedChange(it)
}
UserItemDivider()
}) Represents the screen for creating a UikitGroupChannel
Since
1.0.0-beta.1
Parameters
The modifier to be applied to the view.
channelCreationScreenState
onTopBarNavigationIconClick
The handler for when the top bar navigation icon is clicked.
The handler for when the channel is created.
See also