From 83a4cb8a11bc5bcfc6f65d52a96c171da1d7733d Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 17 Mar 2018 21:43:18 +0100 Subject: [PATCH] setReplaceAll=false on emojiCompat for android o --- .../conversations/ui/service/AbstractEmojiService.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/service/AbstractEmojiService.java b/src/main/java/eu/siacs/conversations/ui/service/AbstractEmojiService.java index 407d8d728..d1882f51e 100644 --- a/src/main/java/eu/siacs/conversations/ui/service/AbstractEmojiService.java +++ b/src/main/java/eu/siacs/conversations/ui/service/AbstractEmojiService.java @@ -1,6 +1,7 @@ package eu.siacs.conversations.ui.service; import android.content.Context; +import android.os.Build; import android.support.text.emoji.EmojiCompat; public abstract class AbstractEmojiService { @@ -15,7 +16,11 @@ public abstract class AbstractEmojiService { public void init() { final EmojiCompat.Config config = buildConfig(); - config.setReplaceAll(true); + //On recent Androids we assume to have the latest emojis + //there are some annoying bugs with emoji compat that make it a safer choice not to use it when possible + // a) when using the ondemand emoji font (play store) flags don’t work + // b) the text preview has annoying glitches when the cut of text contains emojis (the emoji will be half visible) + config.setReplaceAll(Build.VERSION.SDK_INT < Build.VERSION_CODES.O); EmojiCompat.init(config); } }