kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix incorrect emoji style from being used on some devices.
rodzic
063f4d2994
commit
1b784d6522
|
@ -40,6 +40,7 @@ public class EmojiEditText extends AppCompatEditText {
|
||||||
|
|
||||||
if (!isInEditMode() && (forceCustom || !SignalStore.settings().isPreferSystemEmoji())) {
|
if (!isInEditMode() && (forceCustom || !SignalStore.settings().isPreferSystemEmoji())) {
|
||||||
setFilters(appendEmojiFilter(this.getFilters(), jumboEmoji));
|
setFilters(appendEmojiFilter(this.getFilters(), jumboEmoji));
|
||||||
|
setEmojiCompatEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
super.setOnFocusChangeListener((v, hasFocus) -> {
|
super.setOnFocusChangeListener((v, hasFocus) -> {
|
||||||
|
|
|
@ -97,6 +97,8 @@ public class EmojiTextView extends AppCompatTextView {
|
||||||
}
|
}
|
||||||
|
|
||||||
textDirection = getLayoutDirection() == LAYOUT_DIRECTION_LTR ? TextDirectionHeuristics.FIRSTSTRONG_RTL : TextDirectionHeuristics.ANYRTL_LTR;
|
textDirection = getLayoutDirection() == LAYOUT_DIRECTION_LTR ? TextDirectionHeuristics.FIRSTSTRONG_RTL : TextDirectionHeuristics.ANYRTL_LTR;
|
||||||
|
|
||||||
|
setEmojiCompatEnabled(SignalStore.settings().isPreferSystemEmoji() && !forceCustom);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -17,6 +17,10 @@ open class SimpleEmojiTextView @JvmOverloads constructor(
|
||||||
private var bufferType: BufferType? = null
|
private var bufferType: BufferType? = null
|
||||||
private val sizeChangeDebouncer: ThrottledDebouncer = ThrottledDebouncer(200)
|
private val sizeChangeDebouncer: ThrottledDebouncer = ThrottledDebouncer(200)
|
||||||
|
|
||||||
|
init {
|
||||||
|
isEmojiCompatEnabled = SignalStore.settings().isPreferSystemEmoji
|
||||||
|
}
|
||||||
|
|
||||||
override fun setText(text: CharSequence?, type: BufferType?) {
|
override fun setText(text: CharSequence?, type: BufferType?) {
|
||||||
bufferType = type
|
bufferType = type
|
||||||
val candidates = if (isInEditMode) null else EmojiProvider.getCandidates(text)
|
val candidates = if (isInEditMode) null else EmojiProvider.getCandidates(text)
|
||||||
|
|
Ładowanie…
Reference in New Issue