Repository navigation
Conversation
08c3b58 to
e97e27c
Compare
mpretty-cyro
left a comment
There was a problem hiding this comment.
Thanks for your contribution here, there are a few changes which need to be made before this could be merged
|
|
||
| @JvmStatic | ||
| fun isUseSystemEmojiEnabled(context: Context): Boolean { | ||
| return getBooleanPreference(context, USE_SYSTEM_EMOJI, true) |
There was a problem hiding this comment.
On older phones without Google Play fonts new emoji can show as empty boxes so we'd probably want the default to be off for this setting
| } | ||
|
|
||
| override fun isUseSystemEmojiEnabled(): Boolean { | ||
| return getBooleanPreference(USE_SYSTEM_EMOJI, true) |
There was a problem hiding this comment.
Same default value comment
| prefs.observeBooleanKey(TextSecurePreferences.SEND_WITH_ENTER, default = false), | ||
| prefs.observeBooleanKey(TextSecurePreferences.AUTOPLAY_AUDIO_MESSAGES, default = false), | ||
| ) { trim, enter, autoplay -> | ||
| prefs.observeBooleanKey(TextSecurePreferences.USE_SYSTEM_EMOJI, default = true), |
There was a problem hiding this comment.
Same default value comment
| val sendWithEnter: Boolean = false, | ||
| val autoplayAudioMessage: Boolean = false | ||
| val autoplayAudioMessage: Boolean = false, | ||
| val useSystemEmoji: Boolean = true |
There was a problem hiding this comment.
Same default value comment
| subtitle = annotatedStringResource("Render crisp, high-resolution emojis using your device's native font instead of compressed spritesheets"), | ||
| subtitleStyle = LocalType.current.large, | ||
| checked = uiState.useSystemEmoji, | ||
| qaTag = R.string.qa_preferences_send_with_enter, |
There was a problem hiding this comment.
Should have it's own QA tag rather than reusing the "send with enter" one
|
Thanks for the review @mpretty-cyro! Addressed all feedback:
Verified with |
|
also updated EmojiProvider so reaction emojis, reaction pills, the emoji picker and input search bar use the system font too when the setting is on instead of still pulling the 66x66 spritesheets |
First time contributor checklist
Fixes #1234syntax (Fixes Low-res emojis #53)Description
Fixes #53
Session currently uses a legacy 66x66px bitmap spritesheet pipeline (
EmojiProvider/EmojiTextView) inherited from older Signal code. On modern high-DPI screens, these small bitmap tiles appear blurry and pixelated when scaled up.This PR adds a "Use System Emojis" toggle in Settings → Chats (disabled by default to avoid missing glyphs on older devices) that allows messages to render sharp, high-resolution vector emojis using the device's native emoji font rather than the low-resolution spritesheets.
Changes:
USE_SYSTEM_EMOJIkey and getter/setter preferences inTextSecurePreferences.kt(defaults tofalse).EmojiTextView.javato checkisUseSystemEmojiEnabled()before parsing/replacing emoji spans; when enabled, it skips the bitmap spritesheet replacement and renders the native Unicode characters.ChatsPreferenceScreen.ktwith dedicated QA tags incontent-descriptions, and state handling inChatsPreferenceViewModel.kt.Testing:
compilePlayDebugKotlin,compilePlayDebugJavaWithJavac, andtestPlayDebugUnitTest(all tests pass).