@Composableinternal fun RowScope.DefaultChannelItemCenterContent(channel: Channel,isMuted: Boolean,currentUser: User?,) {Column(modifier = Modifier.padding(start = 4.dp, end = 4.dp).weight(1f).wrapContentHeight(),verticalArrangement = Arrangement.Center) {val channelName: (@Composable (modifier: Modifier) -> Unit) = @Composable {Text(modifier = it,text = ChatTheme.channelNameFormatter.formatChannelName(channel, currentUser),style = ChatTheme.typography.bodyBold,fontSize = 16.sp,maxLines = 1,overflow = TextOverflow.Ellipsis,color = ChatTheme.colors.textHighEmphasis,)}if (isMuted) {Row(verticalAlignment = Alignment.CenterVertically) {channelName(Modifier.weight(weight = 1f, fill = false))Icon(modifier = Modifier.padding(start = 8.dp).size(16.dp), painter = painterResource(id = R.drawable.stream_compose_ic_muted),contentDescription = null,tint = ChatTheme.colors.textLowEmphasis,)}} else {channelName(Modifier)} val lastMessageText = channel.getLastMessage(currentUser)?.let { lastMessage -> ChatTheme.messagePreviewFormatter.formatMessagePreview(lastMessage, currentUser)} ?: AnnotatedString("")if (lastMessageText.isNotEmpty()) {Text(text = lastMessageText,maxLines = 1,overflow = TextOverflow.Ellipsis,style = ChatTheme.typography.body,color = ChatTheme.colors.textLowEmphasis,)}}}
Represents the center portion of [ChannelItem], that shows the channel display name and the last message text preview.