@Composable public fun UserReactionItem(item: UserReactionItemState,modifier: Modifier = Modifier,) {val (user, painter, type) = item Column(modifier = modifier,horizontalAlignment = Alignment.CenterHorizontally) {val isMine = user.id == ChatClient.instance().getCurrentUser()?.idval isStartAlignment = ChatTheme.messageOptionsUserReactionAlignment.isStartAlignment(isMine) val alignment = if (isStartAlignment) Alignment.BottomStart else Alignment.BottomEnd Box(modifier = Modifier.width(64.dp)) { UserAvatar(user = user,showOnlineIndicator = false,modifier = Modifier.size(ChatTheme.dimens.userReactionItemAvatarSize)) Image(modifier = Modifier.background(shape = RoundedCornerShape(16.dp), color = ChatTheme.colors.barsBackground).size(ChatTheme.dimens.userReactionItemIconSize).padding(4.dp).align(alignment),painter = painter,contentDescription = type,)} Spacer(modifier = Modifier.height(8.dp))Text(text = user.name,style = ChatTheme.typography.footnoteBold,maxLines = 1,overflow = TextOverflow.Ellipsis,color = ChatTheme.colors.textHighEmphasis,textAlign = TextAlign.Center,)}}
Represent a reaction item with the user who left it.