From e32445f2cfd46816a13ecdc6e17b4e3bde7a237f Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 7 Nov 2020 19:21:42 -0500 Subject: [PATCH] Hide locale subtitle for local source --- .../java/eu/kanade/tachiyomi/ui/browse/source/SourceHolder.kt | 2 +- .../ui/browse/source/globalsearch/GlobalSearchHolder.kt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceHolder.kt index 2252f46ed..0ce0ef4fe 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceHolder.kt @@ -32,7 +32,7 @@ class SourceHolder(private val view: View, val adapter: SourceAdapter) : val source = item.source title.text = source.name - subtitle.isVisible = true + subtitle.isVisible = source !is LocalSource subtitle.text = LocaleHelper.getDisplayName(source.lang) // Set source icon diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchHolder.kt index 518986def..50a7244a9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchHolder.kt @@ -4,6 +4,7 @@ import android.view.View import androidx.core.view.isVisible import androidx.recyclerview.widget.LinearLayoutManager import eu.kanade.tachiyomi.data.database.models.Manga +import eu.kanade.tachiyomi.source.LocalSource import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder import eu.kanade.tachiyomi.util.system.LocaleHelper import kotlinx.android.synthetic.main.global_search_controller_card.no_results_found @@ -53,7 +54,7 @@ class GlobalSearchHolder(view: View, val adapter: GlobalSearchAdapter) : val titlePrefix = if (item.highlighted) "▶ " else "" title.text = titlePrefix + source.name - subtitle.isVisible = true + subtitle.isVisible = source !is LocalSource subtitle.text = LocaleHelper.getDisplayName(source.lang) when {