mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 05:51:49 +01:00
Show locales in list of sources to migrate
This commit is contained in:
parent
5945937e4b
commit
5b7d8c5e37
@ -1,9 +1,11 @@
|
|||||||
package eu.kanade.tachiyomi.ui.browse.migration.sources
|
package eu.kanade.tachiyomi.ui.browse.migration.sources
|
||||||
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import androidx.core.view.isVisible
|
||||||
import eu.davidea.viewholders.FlexibleViewHolder
|
import eu.davidea.viewholders.FlexibleViewHolder
|
||||||
import eu.kanade.tachiyomi.databinding.SourceMainControllerCardItemBinding
|
import eu.kanade.tachiyomi.databinding.SourceMainControllerCardItemBinding
|
||||||
import eu.kanade.tachiyomi.source.icon
|
import eu.kanade.tachiyomi.source.icon
|
||||||
|
import eu.kanade.tachiyomi.util.system.LocaleHelper
|
||||||
|
|
||||||
class SourceHolder(view: View, val adapter: SourceAdapter) :
|
class SourceHolder(view: View, val adapter: SourceAdapter) :
|
||||||
FlexibleViewHolder(view, adapter) {
|
FlexibleViewHolder(view, adapter) {
|
||||||
@ -13,10 +15,10 @@ class SourceHolder(view: View, val adapter: SourceAdapter) :
|
|||||||
fun bind(item: SourceItem) {
|
fun bind(item: SourceItem) {
|
||||||
val source = item.source
|
val source = item.source
|
||||||
|
|
||||||
// Set source name
|
|
||||||
binding.title.text = source.name
|
binding.title.text = source.name
|
||||||
|
binding.subtitle.isVisible = true
|
||||||
|
binding.subtitle.text = LocaleHelper.getDisplayName(source.lang)
|
||||||
|
|
||||||
// Set source icon
|
|
||||||
itemView.post {
|
itemView.post {
|
||||||
binding.image.setImageDrawable(source.icon())
|
binding.image.setImageDrawable(source.icon())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user