fun MembersScreen(navController: NavController?, channelUrl: String, modifier: Modifier = Modifier, onTopBarNavigationIconClick: () -> Unit = { navController?.popBackStack() }, onTopBarActionClick: () -> Unit = { navController?.navigateToUserInvitation(channelUrl) }, onChannelRemoved: (channelUrl: String) -> Unit = {
navController?.popBackStack(SendbirdNavigationRoute.Channels.route, inclusive = false)
}, onMemberItemClick: (user: UikitMember) -> Unit = {}, onMemberItemLongClick: (user: UikitMember) -> Unit = {}, snackbarHostState: SnackbarHostState = remember { SnackbarHostState() }, viewModelContract: MembersViewModelContract = viewModel<MembersViewModel>(
factory = MembersViewModel.factory(
MembersViewModelParams(
channelUrl = channelUrl
)
)
), topBar: @Composable (onNavigationIconClick: () -> Unit, onActionClick: () -> Unit) -> Unit = { onNavigationIconClick, onActionClick ->
MembersTopBar(
onNavigationIconClick = onNavigationIconClick,
onActionClick = onActionClick
)
}, loading: @Composable () -> Unit = {
LoadingScreen()
}, failure: @Composable (e: Throwable) -> Unit = { e ->
FailurePlaceholder(
onRetryClick = { viewModelContract.prepare() }
)
}, empty: @Composable () -> Unit = {
ScreenPlaceholder(
icon = painterResource(id = R.drawable.icon_members),
text = stringResource(id = R.string.sb_text_empty_no_member)
)
}, memberItem: @Composable (member: UikitMember, onClick: (member: UikitMember) -> Unit, onLongClick: (member: UikitMember) -> Unit) -> Unit = { member, onClick, onLongClick ->
MemberItem(
member,
modifier = Modifier,
onClick = onClick,
onLongClick = onLongClick
)
UserItemDivider()
}) Represents the screen that displays the list of UikitMember in a UikitGroupChannel.
Since
1.0.0-beta.1
Parameters
The url of the channel to display the members from.
The modifier to be applied to the view.
onTopBarNavigationIconClick
The handler for when the top bar navigation icon is clicked.
The handler for when the top bar action is clicked.
The handler for when the channel is removed.
The handler for when a member item is clicked.
The handler for when a member item is long clicked.
The top bar composable to be displayed. Defaults to MembersTopBar.
The loading composable to be displayed. Defaults to LoadingScreen.
The member item composable to be displayed. Defaults to MemberItem.
See also