From 9b4ffd1cd565260186618a0afadb5bc0b661064d Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 23 May 2020 10:15:06 -0400 Subject: [PATCH] Fix recycled icon in source migration list when source isn't installed --- .../eu/kanade/tachiyomi/ui/browse/source/SourceHolder.kt | 2 +- .../java/eu/kanade/tachiyomi/ui/migration/SourceHolder.kt | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceHolder.kt index d9c1df465..766237902 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceHolder.kt @@ -43,7 +43,7 @@ class SourceHolder(view: View, override val adapter: SourceAdapter) : // Set source name title.text = source.name - // Set circle letter image. + // Set source icon itemView.post { val icon = source.icon() when { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SourceHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SourceHolder.kt index f88fba4e5..284dc2e14 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SourceHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SourceHolder.kt @@ -39,12 +39,9 @@ class SourceHolder(view: View, override val adapter: SourceAdapter) : // Set source name title.text = source.name - // Set circle letter image. + // Set source icon itemView.post { - val icon = source.icon() - if (icon != null) { - image.setImageDrawable(icon) - } + image.setImageDrawable(source.icon()) } } }