Fix incorrect emoji style from being used on some devices.

This commit is contained in:
Cody Henthorne 2022-09-29 17:10:52 -04:00
parent 063f4d2994
commit 1b784d6522
3 changed files with 7 additions and 0 deletions

View file

@ -40,6 +40,7 @@ public class EmojiEditText extends AppCompatEditText {
if (!isInEditMode() && (forceCustom || !SignalStore.settings().isPreferSystemEmoji())) {
setFilters(appendEmojiFilter(this.getFilters(), jumboEmoji));
setEmojiCompatEnabled(false);
}
super.setOnFocusChangeListener((v, hasFocus) -> {

View file

@ -97,6 +97,8 @@ public class EmojiTextView extends AppCompatTextView {
}
textDirection = getLayoutDirection() == LAYOUT_DIRECTION_LTR ? TextDirectionHeuristics.FIRSTSTRONG_RTL : TextDirectionHeuristics.ANYRTL_LTR;
setEmojiCompatEnabled(SignalStore.settings().isPreferSystemEmoji() && !forceCustom);
}
@Override

View file

@ -17,6 +17,10 @@ open class SimpleEmojiTextView @JvmOverloads constructor(
private var bufferType: BufferType? = null
private val sizeChangeDebouncer: ThrottledDebouncer = ThrottledDebouncer(200)
init {
isEmojiCompatEnabled = SignalStore.settings().isPreferSystemEmoji
}
override fun setText(text: CharSequence?, type: BufferType?) {
bufferType = type
val candidates = if (isInEditMode) null else EmojiProvider.getCandidates(text)