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) {

    private val binding = SourceMainControllerCardItemBinding.bind(view)

    fun bind(item: SourceItem) {
        val source = item.source

        binding.title.text = source.name
        binding.subtitle.isVisible = true
        binding.subtitle.text = LocaleHelper.getDisplayName(source.lang)

        itemView.post {
            binding.image.setImageDrawable(source.icon())
        }
    }
}

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) {

    private val binding = SourceMainControllerCardItemBinding.bind(view)

    fun bind(item: SourceItem) {
        val source = item.source

        binding.title.text = source.name
        binding.subtitle.isVisible = source.lang != ""
        binding.subtitle.text = LocaleHelper.getDisplayName(source.lang)

        itemView.post {
            binding.image.setImageDrawable(source.icon())
        }
    }
}

Hide subtitle in migration list of sources if no language set (i.e. uninstalled source)
Hide subtitle in migration list of sources if no language set (i.e. uninstalled source)

inorichi/tachiyomi,inorichi/mangafeed,inorichi/mangafeed,inorichi/tachiyomi,CarlosEsco/tachiyomi