@Composable internal fun RowScope.DefaultChannelItemTrailingContent(channel: Channel,currentUser: User?,) {val lastMessage = channel.getLastMessage(currentUser) if (lastMessage != null) {Column(modifier = Modifier.padding(start = 4.dp,end = ChatTheme.dimens.channelItemHorizontalPadding,top = ChatTheme.dimens.channelItemVerticalPadding,bottom = ChatTheme.dimens.channelItemVerticalPadding).wrapContentHeight().align(Alignment.Bottom),horizontalAlignment = Alignment.End) {val unreadCount = channel.unreadCountif (unreadCount != null && unreadCount > 0) {UnreadCountIndicator(modifier = Modifier.padding(bottom = 4.dp),unreadCount = unreadCount)}val isLastMessageFromCurrentUser = lastMessage.user.id == currentUser?.id Row(verticalAlignment = Alignment.CenterVertically) {if (isLastMessageFromCurrentUser) {MessageReadStatusIcon(channel = channel,message = lastMessage,currentUser = currentUser,modifier = Modifier.padding(end = 8.dp).size(16.dp))} Timestamp(date = channel.lastUpdated)}}}}
Represents the default trailing content for the channel item. By default it shows the the information about the last message for the channel item, such as its read state,timestamp and how many unread messages the user has.