From 128e75bc24cd50d19368ce936cdea10e279213be Mon Sep 17 00:00:00 2001 From: sk Date: Sun, 22 Oct 2023 23:35:09 +0200 Subject: [PATCH] fix animatable avatars not playing in notification headers closes sk22#882 --- .../ui/displayitems/NotificationHeaderStatusDisplayItem.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/NotificationHeaderStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/NotificationHeaderStatusDisplayItem.java index 8513163d06..df87dae506 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/NotificationHeaderStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/NotificationHeaderStatusDisplayItem.java @@ -6,6 +6,7 @@ import android.annotation.SuppressLint; import android.app.Activity; import android.content.res.ColorStateList; +import android.graphics.drawable.Animatable; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.text.SpannableStringBuilder; @@ -146,6 +147,8 @@ public void setImage(int index, Drawable image){ item.emojiHelper.setImageDrawable(index-1, image); text.invalidate(); } + if(image instanceof Animatable) + ((Animatable) image).start(); } @Override