@Composable public fun ChannelList(modifier: Modifier = Modifier,contentPadding: PaddingValues = PaddingValues(),viewModel: ChannelListViewModel = viewModel(factory =ChannelViewModelFactory(ChatClient.instance(),QuerySortByField.descByName("last_updated"),filters = null)),lazyListState: LazyListState = rememberLazyListState(),onLastItemReached: () -> Unit = { viewModel.loadMore() },onChannelClick: (Channel) -> Unit = {},onChannelLongClick: (Channel) -> Unit = { viewModel.selectChannel(it) },loadingContent: @Composable () -> Unit = { LoadingIndicator(modifier) },emptyContent: @Composable () -> Unit = {DefaultChannelListEmptyContent(modifier) },emptySearchContent: @Composable (String) -> Unit = { searchQuery ->DefaultChannelSearchEmptyContent(searchQuery = searchQuery,modifier = modifier)},helperContent: @Composable BoxScope.() -> Unit = {},loadingMoreContent: @Composable () -> Unit = { DefaultChannelsLoadingMoreIndicator() },itemContent: @Composable (ChannelItemState) -> Unit = { channelItem ->val user by viewModel.user.collectAsState()DefaultChannelItem(channelItem = channelItem,currentUser = user,onChannelClick = onChannelClick,onChannelLongClick =onChannelLongClick)},divider: @Composable () -> Unit = { DefaultChannelItemDivider() },) {val user by viewModel.user.collectAsState()ChannelList(modifier = modifier,contentPadding = contentPadding,channelsState = viewModel.channelsState,currentUser = user,lazyListState = lazyListState,onLastItemReached =onLastItemReached,onChannelClick = onChannelClick,onChannelLongClick = onChannelLongClick,loadingContent = loadingContent,emptyContent = emptyContent,emptySearchContent = emptySearchContent,helperContent = helperContent,loadingMoreContent = loadingMoreContent,itemContent = itemContent,divider = divider)}
Default ChannelList component, that relies on the [ChannelListViewModel] to load the data and show it on the UI.