Update latest tab with the new global search update
This commit is contained in:
parent
079dd953bd
commit
319c41905e
@ -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 <--
|
||||
|
||||
|
@ -17,13 +17,30 @@
|
||||
style="@style/TextAppearance.Regular.SubHeading"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/material_component_text_fields_padding_above_and_below_label"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/subtitle"
|
||||
app:layout_constraintEnd_toStartOf="@+id/title_more_icon"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="Title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subtitle"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/title_more_icon"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title"
|
||||
tools:text="English"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/title_more_icon"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -179,7 +179,6 @@
|
||||
<string name="library_group_updates_all">Lancer des mises à jour de catégorie tout le temps</string>
|
||||
|
||||
<!-- Browse settings -->
|
||||
<string name="pref_latest_tab_language_code">Afficher le code de langue à côté du nom</string>
|
||||
<string name="pref_latest_position">Dernière position de l\'onglet</string>
|
||||
<string name="pref_latest_position_summery">Voulez-vous que le dernier onglet soit le premier onglet de la navigation? Cela en fera l\'onglet par défaut lors de l\'ouverture de la navigation, non recommandé si vous êtes sur des données ou un réseau mesuré</string>
|
||||
<string name="pref_source_navigation">Remplacer le dernier bouton</string>
|
||||
|
@ -174,7 +174,6 @@
|
||||
<string name="library_group_updates_all">Launch category updates all the time</string>
|
||||
|
||||
<!-- Browse settings -->
|
||||
<string name="pref_latest_tab_language_code">Exibir código do idioma ao lado do nome</string>
|
||||
<string name="pref_latest_position">Posição da aba "Recentes"</string>
|
||||
<string name="pref_latest_position_summery">Quer que a aba Recentes seja a primeira em Navegar? Isso fará a aba padrão ao tocar em Navegar, não recomendável se estiver usando com dados móveis ou uma rede medida</string>
|
||||
<string name="pref_source_navigation">Replace latest button</string>
|
||||
|
@ -178,7 +178,6 @@
|
||||
<string name="library_group_updates_all">Launch category updates all the time</string>
|
||||
|
||||
<!-- Browse settings -->
|
||||
<string name="pref_latest_tab_language_code">Display language code next to name</string>
|
||||
<string name="pref_latest_position">Latest tab position</string>
|
||||
<string name="pref_latest_position_summery">Do you want the latest tab to be the first tab in browse? This will make it the default tab when opening browse, not recommended if you\'re on data or a metered network</string>
|
||||
<string name="pref_source_source_filtering">Filter sources in categories</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user