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 85240e06f9..2ffdee0411 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 @@ -27,8 +27,7 @@ class SourceHolder(view: View, val adapter: SourceAdapter) : // Set circle letter image. itemView.post { - val icon = source.icon() - if (icon != null) edit_button.setImageDrawable(source.icon()) + edit_button.setImageDrawable(source.icon()) } } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/design/MigrationSourceHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/design/MigrationSourceHolder.kt index 526b99e1cb..3dff9740db 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/design/MigrationSourceHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/design/MigrationSourceHolder.kt @@ -25,7 +25,7 @@ class MigrationSourceHolder(view: View, val adapter: MigrationSourceAdapter) : // Update circle letter image. itemView.post { val icon = source.icon() - if (icon != null) edit_button.setImageDrawable(source.icon()) + if (icon != null) edit_button.setImageDrawable(icon) } if (sourceEnabled) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/source/SourceHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/source/SourceHolder.kt index e0fa297f56..ae11e647fb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/source/SourceHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/source/SourceHolder.kt @@ -54,9 +54,10 @@ class SourceHolder(view: View, val adapter: SourceAdapter) : // Set circle letter image. itemView.post { val icon = source.icon() - if (icon != null) edit_button.setImageDrawable(source.icon()) - else if (item.source.id == LocalSource.ID) - edit_button.setImageResource(R.mipmap.ic_local_source) + when { + icon != null -> edit_button.setImageDrawable(icon) + item.source.id == LocalSource.ID -> edit_button.setImageResource(R.mipmap.ic_local_source) + } } if (source.supportsLatest) {