talk-android icon indicating copy to clipboard operation
talk-android copied to clipboard

❤️ Heart emoji inconsistant between Android and iOS

Open CreatorOfBiontium opened this issue 3 weeks ago • 12 comments

Steps to reproduce

  1. Get an Android Talk user to react with a ❤️ on a message.
  2. Get an iOS user to react with ❤️ on the same message.

Expected behaviour

It should show: ❤️2

Actual behaviour

It shows: ❤️1 ❤️1

Device brand and model

Samsung S24 Ultra

Android version

16

Nextcloud Talk app version

22.0.3

Nextcloud server version

32.0.1

Talk version

22.0.4

Custom Signaling server configured

No

Custom TURN server configured

No

Custom STUN server configured

Yes

Android logs

No response

Server log


Additional information

Looks like this in the app: Image

And in the web: Image

Couldn't the solution be, to just add the ❤️ instead of some unicode or whatever is added there? And should I open an issue request for double-tapping for the heart emoji reaction?

CreatorOfBiontium avatar Dec 07 '25 21:12 CreatorOfBiontium

How does it look on iOS? Does it show 2 different looking hearts like on web? Or do they look the same like on android?

mahibi avatar Dec 08 '25 13:12 mahibi

And should I open an issue request for double-tapping for the heart emoji reaction?

Not yet sure what you mean, but in any way yes please open a different issue for it.

mahibi avatar Dec 08 '25 13:12 mahibi

@mahibi I'm not trying to solve world hunger in one issue, I will definitely open a new one, but I wanted the feedback, if maintainers or whoever reads this would like to have the feature to double-tap a message and give it the heart emoji reaction. And I will try to get a screenshot from the iOS app.

CreatorOfBiontium avatar Dec 08 '25 14:12 CreatorOfBiontium

Pretty sure these are 2 different emojis, I’ve seen the behavior as well. One is a red heart and one is a heart for playing cards. On iOS you notice the difference

Image Image

SystemKeeper avatar Dec 09 '25 12:12 SystemKeeper

Pretty sure these are 2 different emojis

I would have guessed so too. So we "just" need to align/unify which heart emoji should be used by all clients and expect it should be the non-paying-cards one which is also the one other messengers use, so it can be considered a defacto-standard.

AndyScherzinger avatar Dec 09 '25 12:12 AndyScherzinger

So we "just" need to align/unify which heart emoji should be used

I am not really sure we should do that, as we allow any emoji to be a reaction and these are infact different emojis 🤔 I think the problem is not what we show as default, but people searching for heart and then choosing the wrong one?

SystemKeeper avatar Dec 09 '25 13:12 SystemKeeper

I am not really sure we should do that, as we allow any emoji to be a reaction and these are infact different emojis 🤔 I think the problem is not what we show as default, but people searching for heart and then choosing the wrong one?

agree. I don't think we can do anything to solve it. Whats confusing: once you ever began to use the "wrong" emoji, it will be promoted to "recently used" and then you may end up with always using it.

mahibi avatar Dec 09 '25 14:12 mahibi

The thing is, that the "wrong" heart emoji seems to be the default, when you install the app and open the reactions menu. Like it is the first emoji there. Because averyone who has android Talk seems to use the card heart. Or is it not true?

CreatorOfBiontium avatar Dec 09 '25 14:12 CreatorOfBiontium

@SystemKeeper @mahibi I am refering to this:

https://github.com/nextcloud/talk-android/blob/master/app/src/main/res/values/strings.xml#L402

to be unified across the clients. Which is what @CreatorOfBiontium is refering to as well I believe.

So the web shows: Image

iOS I don't know. So with unification I am referring to these views showing the same heart emoji and I am not sure we do. If that is actually the case than there is nothing to be done. But this we could check, no?

AndyScherzinger avatar Dec 09 '25 16:12 AndyScherzinger

I had a closer look... The heart emoji in the defaults is the same. But there is something wrong with sending the Emoji Variation Selector.

I debugged and saw that there are differences between web and android:

used code to debug in nextcloud/talk/adapters/messages/Reaction.kt

    fun showReactions(
        message: ChatMessage,
        clickOnReaction: (message: ChatMessage, emoji: String) -> Unit,
        longClickOnReaction: (message: ChatMessage) -> Unit,
        binding: ReactionsInsideMessageBinding,
        context: Context,
        isOutgoingMessage: Boolean,
        viewThemeUtils: ViewThemeUtils,
        isBubbled: Boolean = true
    ) {
        binding.reactionsEmojiWrapper.removeAllViews()

        if (message.reactions != null && message.reactions!!.isNotEmpty()) {
            message.reactions!!.forEach {
                val emoji = it.key

                Log.d("emoji", emoji)

                emoji.codePoints().forEach { cp ->
                    Log.d("code", "U+${cp.toString(16).uppercase()}")
                }
            }

from web:

emoji ❤️
code U+2764
code U+FE0F

from Android:

emoji ❤
code U+2764

So this is about Emoji Variation Selector (VS-16). The emojis that are send from android are not styled (they do not include the Emoji Variation Selector).

If i append FE0F to the classic emojis, it is fixed. But it seems the challenge is to decide when to append the Emoji Variation Selector.

mahibi avatar Dec 09 '25 17:12 mahibi

... But it seems the challenge is to decide when to append the Emoji Variation Selector.

In https://github.com/nextcloud/talk-android/blob/61870463f6a9c8a0c600a60c10c7cd964d22f8ec/app/src/main/java/com/nextcloud/talk/repositories/reactions/ReactionsRepositoryImpl.kt#L34 i quickly tried with

        fun forceEmojiStyle(text: String): String {
            if (text.isEmpty()) return text

            val cps = text.codePoints().toArray()
            val lastCp = cps.last()

            return if (lastCp != 0xFE0F) {
                text + "\uFE0F"
            } else {
                text
            }
        }

to append the style if there is not already one while sending. Works for classic emojis to append the style but other styled emojis are duplicated... ... might have a closer look tomorrow

mahibi avatar Dec 09 '25 17:12 mahibi

i pushed the code for debugging to https://github.com/nextcloud/talk-android/pull/5632 but won't find the time for now to continue due to other things..

mahibi avatar Dec 10 '25 09:12 mahibi