Feature Description
If you have integrated TUIKit Compose, you can use the message emoji reaction feature directly.
Feature Showcase
Sending Emoji Reactions
Once the emoji reaction feature is integrated, a React action appears in the menu when you long-press a message. Tap React to switch the menu to an emoji selection panel, then tap the button in the bottom-right corner of the panel to view more emojis. Select an emoji to react to the message. If you have already reacted with that emoji, tapping it again will remove your reaction.
Displaying Emoji Reactions
All emoji reactions applied to a message are shown below the message and are visible to every member in the conversation.
You can see which emojis were used and which members reacted with them. Tap an emoji or a member nickname to view detailed emoji reaction information for that message.
In the emoji reaction details interface, you can quickly revoke your own reaction by tapping your own entry, which is marked Tap to remove.
Disabling Message Emoji Reactions
The MessageListConfig.kt file includes a feature toggle named isSupportReaction for message emoji reactions. This option is a Boolean and defaults to true.
To disable the emoji reaction feature, pass the config to MessageList during initialization:
import io.trtc.tuikit.chat.uikit.components.messagelist.config.ChatMessageListConfig
import io.trtc.tuikit.chat.uikit.components.messagelist.ui.MessageList
val config = ChatMessageListConfig(isSupportReaction = false)
MessageList(conversationID = conversationID, config = config)