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.
|
// Set circle letter image.
|
||||||
itemView.post {
|
itemView.post {
|
||||||
val icon = source.icon()
|
edit_button.setImageDrawable(source.icon())
|
||||||
if (icon != null) edit_button.setImageDrawable(source.icon())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ class MigrationSourceHolder(view: View, val adapter: MigrationSourceAdapter) :
|
||||||
// Update circle letter image.
|
// Update circle letter image.
|
||||||
itemView.post {
|
itemView.post {
|
||||||
val icon = source.icon()
|
val icon = source.icon()
|
||||||
if (icon != null) edit_button.setImageDrawable(source.icon())
|
if (icon != null) edit_button.setImageDrawable(icon)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sourceEnabled) {
|
if (sourceEnabled) {
|
||||||
|
|
|
@ -54,9 +54,10 @@ class SourceHolder(view: View, val adapter: SourceAdapter) :
|
||||||
// Set circle letter image.
|
// Set circle letter image.
|
||||||
itemView.post {
|
itemView.post {
|
||||||
val icon = source.icon()
|
val icon = source.icon()
|
||||||
if (icon != null) edit_button.setImageDrawable(source.icon())
|
when {
|
||||||
else if (item.source.id == LocalSource.ID)
|
icon != null -> edit_button.setImageDrawable(icon)
|
||||||
edit_button.setImageResource(R.mipmap.ic_local_source)
|
item.source.id == LocalSource.ID -> edit_button.setImageResource(R.mipmap.ic_local_source)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (source.supportsLatest) {
|
if (source.supportsLatest) {
|
||||||
|
|
Reference in a new issue