From ad3fd2d6425b5c411a3a689dcb0039c9743dcecb Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 2 Mar 2021 14:24:20 +0100 Subject: [PATCH] update the next track placeholder image on the main thread --- .../simplemobiletools/musicplayer/activities/TrackActivity.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/TrackActivity.kt b/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/TrackActivity.kt index 4bbc7a1c..f927e786 100644 --- a/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/TrackActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/TrackActivity.kt @@ -188,7 +188,9 @@ class TrackActivity : SimpleActivity() { .apply(options) .listener(object : RequestListener { override fun onLoadFailed(e: GlideException?, model: Any?, target: Target?, isFirstResource: Boolean): Boolean { - next_track_image.setImageDrawable(nextTrackPlaceholder) + runOnUiThread { + next_track_image.setImageDrawable(nextTrackPlaceholder) + } return true }