Fix GIF animation by checking Drawable

In onSuccess, use if (drawable is Animatable) to start GIFs instead of checking the Coil Image result.
This commit is contained in:
Hafiz 2025-06-09 19:17:37 -05:00 committed by Phillip Thelen
parent 1bfb5b3ff3
commit 061eeea313

View file

@ -205,8 +205,8 @@ class AvatarView : FrameLayout {
drawable.isFilterBitmap = false
super.onSuccess(result)
imageView.setImageDrawable(drawable)
if (result is Animatable) {
result.start()
if (drawable is Animatable) {
drawable.start()
}
val bounds = getLayerBounds(layerKey, layerName, drawable)
imageView.imageMatrix = avatarMatrix