Persist and re-apply a chosen skin tone in the grid, recents and search - #263
Merged
Conversation
Fintasys
force-pushed
the
claude/emoji-picker-user-control-ksleyc
branch
2 times, most recently
from
July 20, 2026 16:26
cb49bb2 to
61d9468
Compare
Add an opt-in `SkinToneConfig.rememberSkinTone` flag. When enabled, the tone picked via the long-press picker is persisted to SharedPreferences and re-applied as the default for skin-tone-capable emoji in the grid, recents and search on the next launch. Selecting the base glyph clears the remembered tone. Also strips an existing tone before re-applying so re-picking a toned glyph yields a valid single-modifier sequence, and makes the long-press picker operate on the base glyph. Updates README, CHANGELOG and tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fintasys
force-pushed
the
claude/emoji-picker-user-control-ksleyc
branch
from
July 21, 2026 02:58
61d9468 to
549a2f5
Compare
- EmojiPickerUtils.removeSkinTone now delegates to the internal cached regex instead of recompiling RegExp on every call - Correct README SkinTone config table: enableSkinTones -> enabled Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #262
Summary
Adds optional support for remembering a user's skin tone choice and re-applying it for display and selection in the grid, recents and search — controlled entirely through
SkinToneConfig. PreviouslySkinToneConfigonly controlled visuals and there was no way to make the grid or recents show a previously selected tone.What changed
New
SkinToneConfigsettingsdefaultSkinTonenull(base glyph, previous behavior)skinToneResolverString? Function(Emoji)returning the tone to display; falls back todefaultSkinTonewhen it returnsnullnullA
resolveSkinTone(Emoji)helper resolves the effective tone (resolver takes precedence, then the global default).Display + selection
EmojiPickerUtils.applyDisplaySkinTone(emoji, skinToneConfig)returns the toned glyph for display/selection when a tone applies, otherwise the emoji unchanged.hasSkinToneis preserved so the indicator and long-press picker keep working on those cells.LayerLinkkey, so tapping a toned cell selects the toned glyph. Recents display the tone too, since recent entries keephasSkinTone.Correctness fixes (from the issue's note)
applySkinTonenow strips any existing skin tone modifier before applying a new one, so re-toning an already toned glyph no longer produces invalid double-modifier sequences (e.g.👋🏻🏽).EmojiPickerUtils.removeSkinTone.Backward compatibility
With no
defaultSkinTone/skinToneResolverset,applyDisplaySkinTonereturns the base glyph and every code path is unchanged — existing behavior and tests are preserved.Tests
Added unit tests for
applySkinToneon already-toned glyphs,removeSkinTone,SkinToneConfig.resolveSkinTone, andapplyDisplaySkinTone(default, disabled, non-toneable, precedence).🤖 Generated with Claude Code
https://claude.ai/code/session_01EP92uNBmLFz6ckKR8MHueg
Generated by Claude Code