MembersScreen

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

Parameters

channelUrl

The url of the channel to display the members from.

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.

onMemberItemClick

The handler for when a member item is clicked.

onMemberItemLongClick

The handler for when a member item is long clicked.

viewModelContract

The MembersViewModelContract to handle the business logic.

topBar

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

loading

The loading composable to be displayed. Defaults to LoadingScreen.

failure

The failure composable to be displayed. Defaults to FailurePlaceholder.

empty

The empty composable to be displayed. Defaults to ScreenPlaceholder.

memberItem

The member item composable to be displayed. Defaults to MemberItem.

See also