From 1eef035a9ec5e379887b867f3527e67d49d312c5 Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Fri, 21 Feb 2020 18:21:47 +0100 Subject: [PATCH] fix default emoji font icon not rendering --- .../java/com/keylesspalace/tusky/util/EmojiCompatFont.java | 3 ++- app/src/main/res/drawable/ic_emoji_34dp.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/util/EmojiCompatFont.java b/app/src/main/java/com/keylesspalace/tusky/util/EmojiCompatFont.java index ea0479829..ca7899e7a 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/EmojiCompatFont.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/EmojiCompatFont.java @@ -8,6 +8,7 @@ import android.util.Pair; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; import com.keylesspalace.tusky.R; @@ -144,7 +145,7 @@ public class EmojiCompatFont { } public Drawable getThumb(Context context) { - return context.getResources().getDrawable(img); + return ContextCompat.getDrawable(context, img); } public String getVersion() { diff --git a/app/src/main/res/drawable/ic_emoji_34dp.xml b/app/src/main/res/drawable/ic_emoji_34dp.xml index d779af3bc..b00cb9684 100644 --- a/app/src/main/res/drawable/ic_emoji_34dp.xml +++ b/app/src/main/res/drawable/ic_emoji_34dp.xml @@ -4,6 +4,6 @@ android:viewportHeight="24" android:viewportWidth="24"> \ No newline at end of file