@Composableprivate fun buildUserReactionItems(message: Message,currentUser: User?,): List<UserReactionItemState> {val iconFactory = ChatTheme.reactionIconFactoryreturn message.latestReactions.filter { it.user != null && iconFactory.isReactionSupported(it.type) }.map {val user = requireNotNull(it.user) val type = it.typeval isMine = currentUser?.id == user.idval painter = iconFactory.createReactionIcon(type).getPainter(isMine)UserReactionItemState(user = user,painter = painter,type = type)}}
Builds a list of user reactions, based on the current user and the selected message.