Added Local Source icon (#2961)

This commit is contained in:
Jays2Kings 2020-04-25 22:27:20 -04:00 committed by GitHub
parent 9d22a9e664
commit 64ba127e7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 2 deletions

View File

@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.ui.source
import android.view.View
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.source.LocalSource
import eu.kanade.tachiyomi.source.icon
import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder
import eu.kanade.tachiyomi.ui.base.holder.SlicedHolder
@ -46,8 +47,11 @@ class SourceHolder(view: View, override val adapter: SourceAdapter) :
// Set circle letter image.
itemView.post {
val icon = source.icon()
if (icon != null) image.setImageDrawable(icon)
else image.roundTextIcon(source.name)
when {
icon != null -> image.setImageDrawable(icon)
item.source.id == LocalSource.ID -> image.setImageResource(R.mipmap.ic_local_source)
else -> image.roundTextIcon(source.name)
}
}
source_browse.setText(R.string.browse)

Binary file not shown.

After

Width:  |  Height:  |  Size: 882 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB