Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix emoji code for "Dislike" reaction #194

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

shahzadansari
Copy link
Contributor

There is no mapped emoji available for :hate: in ReactionMapper. so the emoji fallbacks to text only.

🎯 Goal

Before

Screenshot 2024-03-17 at 4 49 51 PM

After

Screenshot 2024-03-17 at 4 49 46 PM

🛠 Implementation details

Replaced ":hate:" usage with ":dislike:" as it is available in ReactionMapper

fun defaultReactionMapper(): ReactionMapper {
            return ReactionMapper { emojiCode ->
                when (emojiCode) {
                    ":fireworks:", ":tada:" -> "\uD83C\uDF89"
                    ":raise-hand:" -> "✋"
                    ":like:" -> "\uD83D\uDC4D"
                    ":dislike:" -> "\uD83D\uDC4E"
                    ":hello:" -> "\uD83D\uDC4B"
                    ":smile:" -> "\uD83D\uDE42"
                    ":heart:" -> "\u2665"
                    else -> emojiCode
                }
            }
        }

There is no mapped emoji available for "hate" in ReactionMapper.kt so the emoji fallbacks to text only
Copy link
Member

@skydoves skydoves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thank you for your contribution, @shahzadansari !

@skydoves skydoves merged commit 5788d90 into GetStream:main Mar 18, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants