Skip to content

Conversation

SanyamSuyal
Copy link

@SanyamSuyal SanyamSuyal commented Oct 5, 2025

Emoji variations were incrementing the sprite index incorrectly, causing wrong emojis to display when mixed with text or used as reactions.

First time contributor checklist

Contributor checklist

  • Code review and unit test verification
  • My contribution is fully baked and ready to be merged as is
  • I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the Fixes #14361 syntax

Description

Problem:
Emoji variations (such as skin tone modifiers) were incorrectly incrementing the sprite sheet index for each variation. This caused wrong emojis to display when mixed with text or used as reactions.

Root Cause:
The sprite sheet contains only one image per base emoji, but the code in EmojiSource.kt was creating separate indices for each variation (default + skin tones), causing an index mismatch between the emoji tree and sprite positions.

Solution:
Modified the emoji tree building logic to capture the index once per emoji and share it across all variations, ensuring all variations reference the same sprite sheet position.

Testing:

  • Code review confirms the fix aligns with the sprite sheet architecture

Changes:

  • app/src/main/java/org/thoughtcrime/securesms/emoji/EmojiSource.kt (2 lines changed)

Fixes #14361

Emoji variations were incrementing the sprite index incorrectly, causing wrong emojis to display when mixed with text or used as reactions.
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.

Incorrect emoji is displayed

1 participant