From 57cd99f619997810c666dd7705688b07e72c27bc Mon Sep 17 00:00:00 2001 From: Stanislav Dmitrenko <7953703+avently@users.noreply.github.com> Date: Sat, 11 Jan 2025 04:16:05 +0700 Subject: [PATCH] android, desktop: disable new emojis (#5507) --- .../kotlin/chat/simplex/common/model/ChatModel.kt | 8 ++++++++ .../chat/simplex/common/views/chat/item/ChatItemView.kt | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt index a9599cebc3..1ddf58aef8 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt @@ -3257,6 +3257,14 @@ sealed class MsgReaction { companion object { val values: List get() = MREmojiChar.values().map(::Emoji) + val old: List get() = listOf( + MREmojiChar.ThumbsUp, + MREmojiChar.ThumbsDown, + MREmojiChar.Smile, + MREmojiChar.Sad, + MREmojiChar.Heart, + MREmojiChar.Launch + ).map(::Emoji) } } diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/ChatItemView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/ChatItemView.kt index 7915d1adf7..e0650e1d80 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/ChatItemView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/ChatItemView.kt @@ -258,7 +258,7 @@ fun ChatItemView( @Composable fun MsgReactionsMenu() { - val rs = MsgReaction.values.mapNotNull { r -> + val rs = MsgReaction.old.mapNotNull { r -> if (null == cItem.reactions.find { it.userReacted && it.reaction.text == r.text }) { r } else {