@Composable public fun UnreadCountIndicator( unreadCount: Int, modifier: Modifier = Modifier, color: Color = ChatTheme.colors.errorAccent, ) { val displayText = if (unreadCount > LimitTooManyUnreadCount) UnreadCountMany else unreadCount.toString() val shape = RoundedCornerShape(9.dp)  Box( modifier = modifier .defaultMinSize(minWidth = 18.dp, minHeight = 18.dp) .background(shape = shape, color = color) .padding(horizontal = 4.dp), contentAlignment = Alignment.Center ) { Text( text = displayText, color = Color.White, textAlign = TextAlign.Center, style = ChatTheme.typography.captionBold ) } }
Shows the unread count badge for each channel item, to showcase how many messages the user didn't read.