@Composable public fun ChannelAvatar( channel: Channel,currentUser: User?,modifier: Modifier = Modifier,shape: Shape = ChatTheme.shapes.avatar,textStyle: TextStyle = ChatTheme.typography.title3Bold,groupAvatarTextStyle: TextStyle = ChatTheme.typography.captionBold,showOnlineIndicator: Boolean = true,onlineIndicatorAlignment: OnlineIndicatorAlignment = OnlineIndicatorAlignment.TopEnd,onlineIndicator: @Composable BoxScope.() -> Unit = {DefaultOnlineIndicator(onlineIndicatorAlignment)}, contentDescription: String? = null,onClick: (() -> Unit)? = null,) {val members = channel.membersval memberCount = members.sizewhen {channel.image.isNotEmpty() ->  { Avatar( modifier = modifier,imageUrl = channel.image,initials = channel.initials,textStyle = textStyle,shape = shape,contentDescription = contentDescription,onClick = onClick)}memberCount == 1 -> {val user = members.first().userUserAvatar(modifier = modifier,user = user,shape = shape,contentDescription = user.name, showOnlineIndicator = showOnlineIndicator,onlineIndicatorAlignment = onlineIndicatorAlignment,onlineIndicator = onlineIndicator,onClick = onClick)}memberCount == 2 && members.any { it.user.id == currentUser?.id } -> {val user = members.first { it.user.id != currentUser?.id }.user UserAvatar(modifier = modifier,user = user,shape = shape, contentDescription = user.name,showOnlineIndicator = showOnlineIndicator,onlineIndicatorAlignment = onlineIndicatorAlignment,onlineIndicator = onlineIndicator, onClick = onClick)}else -> {val users = members.filter { it.user.id != currentUser?.id }.map { it.user }GroupAvatar(users = users,modifier = modifier,shape = shape,textStyle = groupAvatarTextStyle,onClick = onClick,)}}}
Represents the [Channel] avatar that's shown when browsing channels or when you open the Messages screen.Based on the state of the [Channel] and the number of members, it shows different types of images.