Show locales in list of sources to migrate

This commit is contained in:
arkon 2021-02-07 22:54:13 -05:00
parent 5945937e4b
commit 5b7d8c5e37

View File

@ -1,9 +1,11 @@
package eu.kanade.tachiyomi.ui.browse.migration.sources
import android.view.View
import androidx.core.view.isVisible
import eu.davidea.viewholders.FlexibleViewHolder
import eu.kanade.tachiyomi.databinding.SourceMainControllerCardItemBinding
import eu.kanade.tachiyomi.source.icon
import eu.kanade.tachiyomi.util.system.LocaleHelper
class SourceHolder(view: View, val adapter: SourceAdapter) :
FlexibleViewHolder(view, adapter) {
@ -13,10 +15,10 @@ class SourceHolder(view: View, val adapter: SourceAdapter) :
fun bind(item: SourceItem) {
val source = item.source
// Set source name
binding.title.text = source.name
binding.subtitle.isVisible = true
binding.subtitle.text = LocaleHelper.getDisplayName(source.lang)
// Set source icon
itemView.post {
binding.image.setImageDrawable(source.icon())
}