Some source icon clean up
This commit is contained in:
parent
6bdc720249
commit
900238c84f
3 changed files with 6 additions and 6 deletions
|
@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Reference in a new issue