mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-28 12:19:54 +00:00
android, desktop: enable reactions 😂 and ✅
This commit is contained in:
parent
0f3e546e36
commit
82f9fecccf
2 changed files with 7 additions and 5 deletions
|
@ -3336,14 +3336,16 @@ sealed class MsgReaction {
|
|||
}
|
||||
|
||||
companion object {
|
||||
val values: List<MsgReaction> get() = MREmojiChar.values().map(::Emoji)
|
||||
val old: List<MsgReaction> get() = listOf(
|
||||
val values: List<MsgReaction> get() = MREmojiChar.entries.map(::Emoji)
|
||||
val supported: List<MsgReaction> get() = listOf(
|
||||
MREmojiChar.ThumbsUp,
|
||||
MREmojiChar.ThumbsDown,
|
||||
MREmojiChar.Smile,
|
||||
MREmojiChar.Laugh,
|
||||
MREmojiChar.Sad,
|
||||
MREmojiChar.Heart,
|
||||
MREmojiChar.Launch
|
||||
MREmojiChar.Launch,
|
||||
MREmojiChar.Check
|
||||
).map(::Emoji)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -337,7 +337,7 @@ fun ChatItemView(
|
|||
|
||||
@Composable
|
||||
fun MsgReactionsMenu() {
|
||||
val rs = MsgReaction.old.mapNotNull { r ->
|
||||
val rs = MsgReaction.supported.mapNotNull { r ->
|
||||
if (null == cItem.reactions.find { it.userReacted && it.reaction.text == r.text }) {
|
||||
r
|
||||
} else {
|
||||
|
@ -348,7 +348,7 @@ fun ChatItemView(
|
|||
Row(modifier = Modifier.padding(horizontal = DEFAULT_PADDING).horizontalScroll(rememberScrollState()), verticalAlignment = Alignment.CenterVertically) {
|
||||
rs.forEach() { r ->
|
||||
Box(
|
||||
Modifier.size(36.dp).clickable {
|
||||
Modifier.size(36.dp).clip(CircleShape).clickable {
|
||||
setReaction(cInfo, cItem, true, r)
|
||||
showMenu.value = false
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue