Skip to content

Commit d253bb4

Browse files
committed
fix: update asyncDrawable internal state on the main thread
1 parent 06fbb68 commit d253bb4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

android/src/main/java/com/swmansion/enriched/common/AsyncDrawable.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ class AsyncDrawable(
5757
} catch (e: Exception) {
5858
Log.e("AsyncDrawable", "Failed to load: $url", e)
5959

60-
loadPlaceholderImage()
60+
mainHandler.post {
61+
loadPlaceholderImage()
62+
}
6163
} finally {
6264
isLoaded = true
6365
onLoaded?.invoke()

0 commit comments

Comments
 (0)