Update latest tab with the new global search update
This commit is contained in:
@@ -281,8 +281,6 @@ object PreferenceKeys {
|
||||
|
||||
const val latest_tab_position = "latest_tab_position"
|
||||
|
||||
const val latest_tab_language_code = "latest_tab_language_code"
|
||||
|
||||
const val sources_tab_categories = "sources_tab_categories"
|
||||
|
||||
const val sources_tab_categories_filter = "sources_tab_categories_filter"
|
||||
|
||||
@@ -401,8 +401,6 @@ class PreferencesHelper(val context: Context) {
|
||||
|
||||
fun latestTabInFront() = flowPrefs.getBoolean(Keys.latest_tab_position, false)
|
||||
|
||||
fun latestTabDisplayLanguageCode() = flowPrefs.getBoolean(Keys.latest_tab_language_code, false)
|
||||
|
||||
fun sourcesTabCategories() = flowPrefs.getStringSet(Keys.sources_tab_categories, mutableSetOf())
|
||||
|
||||
fun sourcesTabCategoriesFilter() = flowPrefs.getBoolean(Keys.sources_tab_categories_filter, false)
|
||||
|
||||
@@ -4,15 +4,14 @@ 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.data.preference.PreferencesHelper
|
||||
import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder
|
||||
import eu.kanade.tachiyomi.util.system.LocaleHelper
|
||||
import kotlinx.android.synthetic.main.latest_controller_card.no_results_found
|
||||
import kotlinx.android.synthetic.main.latest_controller_card.progress
|
||||
import kotlinx.android.synthetic.main.latest_controller_card.recycler
|
||||
import kotlinx.android.synthetic.main.latest_controller_card.subtitle
|
||||
import kotlinx.android.synthetic.main.latest_controller_card.title
|
||||
import kotlinx.android.synthetic.main.latest_controller_card.title_wrapper
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
|
||||
/**
|
||||
* Holder that binds the [LatestItem] containing catalogue cards.
|
||||
@@ -52,10 +51,10 @@ class LatestHolder(view: View, val adapter: LatestAdapter) :
|
||||
val results = item.results
|
||||
|
||||
val titlePrefix = if (item.highlighted) "▶ " else ""
|
||||
val langSuffix = if (source.lang.isNotEmpty() && Injekt.get<PreferencesHelper>().latestTabDisplayLanguageCode().get()) " (${source.lang})" else ""
|
||||
|
||||
// Set Title with country code if available.
|
||||
title.text = titlePrefix + source.name + langSuffix
|
||||
title.text = titlePrefix + source.name
|
||||
subtitle.isVisible = true
|
||||
subtitle.text = LocaleHelper.getDisplayName(source.lang)
|
||||
|
||||
when {
|
||||
results == null -> {
|
||||
|
||||
@@ -64,12 +64,6 @@ class SettingsBrowseController : SettingsController() {
|
||||
summaryRes = R.string.pref_latest_position_summery
|
||||
defaultValue = false
|
||||
}
|
||||
|
||||
switchPreference {
|
||||
key = Keys.latest_tab_language_code
|
||||
titleRes = R.string.pref_latest_tab_language_code
|
||||
defaultValue = false
|
||||
}
|
||||
}
|
||||
// SY <--
|
||||
|
||||
|
||||
Reference in New Issue
Block a user