mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-14 07:35:10 +01:00
Removed unread badge from catelouge items + warning for nav drawer
Side nav is painful to maintain so sooner or later it's going bye bye
This commit is contained in:
parent
c48252b61c
commit
1bb2edc4bb
@ -30,11 +30,8 @@ class CatalogueItem(val manga: Manga, private val catalogueAsList: Preference<Bo
|
|||||||
val parent = adapter.recyclerView
|
val parent = adapter.recyclerView
|
||||||
return if (parent is AutofitRecyclerView) {
|
return if (parent is AutofitRecyclerView) {
|
||||||
view.apply {
|
view.apply {
|
||||||
/*val params = card.layoutParams
|
card.layoutParams = FrameLayout.LayoutParams(
|
||||||
//val fiveDp = 10.dpToPx
|
MATCH_PARENT, parent.itemWidth / 3 * 4)
|
||||||
params.height = MATCH_PARENT
|
|
||||||
params.width = parent.itemWidth / 3 * 4
|
|
||||||
card.layoutParams = params*/
|
|
||||||
gradient.layoutParams = FrameLayout.LayoutParams(
|
gradient.layoutParams = FrameLayout.LayoutParams(
|
||||||
MATCH_PARENT, parent.itemWidth / 3 * 4 / 2, Gravity.BOTTOM)
|
MATCH_PARENT, parent.itemWidth / 3 * 4 / 2, Gravity.BOTTOM)
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package eu.kanade.tachiyomi.ui.setting
|
|||||||
import androidx.appcompat.app.AppCompatDelegate
|
import androidx.appcompat.app.AppCompatDelegate
|
||||||
import androidx.biometric.BiometricManager
|
import androidx.biometric.BiometricManager
|
||||||
import androidx.preference.PreferenceScreen
|
import androidx.preference.PreferenceScreen
|
||||||
|
import com.afollestad.materialdialogs.MaterialDialog
|
||||||
import eu.kanade.tachiyomi.BuildConfig
|
import eu.kanade.tachiyomi.BuildConfig
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.data.preference.getOrDefault
|
import eu.kanade.tachiyomi.data.preference.getOrDefault
|
||||||
@ -64,13 +65,23 @@ class SettingsGeneralController : SettingsController() {
|
|||||||
key = Keys.useBottomNav
|
key = Keys.useBottomNav
|
||||||
titleRes = R.string.use_bottom_nav
|
titleRes = R.string.use_bottom_nav
|
||||||
defaultValue = true
|
defaultValue = true
|
||||||
onChange {
|
onChange { bottomNav ->
|
||||||
activity?.recreate()
|
bottomNav as Boolean
|
||||||
if (it as Boolean) {
|
if (!bottomNav) {
|
||||||
(activity as MainActivity).navigationView.selectedItemId = R.id.nav_drawer_settings
|
MaterialDialog(activity!!).title(R.string.switch_to_sidebar)
|
||||||
|
.message(R.string.switch_to_sidebar_summary)
|
||||||
|
.positiveButton(R.string.action_switch) {
|
||||||
|
preferences.useBottonNav().set(bottomNav)
|
||||||
|
switchNavType(bottomNav)
|
||||||
|
}.negativeButton(android.R.string.no).show()
|
||||||
|
false
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
switchNavType(bottomNav)
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
listPreference(activity) {
|
listPreference(activity) {
|
||||||
@ -148,4 +159,11 @@ class SettingsGeneralController : SettingsController() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun switchNavType(bottomNav: Boolean) {
|
||||||
|
activity?.recreate()
|
||||||
|
if (bottomNav) {
|
||||||
|
(activity as MainActivity).navigationView.selectedItemId = R.id.nav_drawer_settings
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,8 +45,8 @@
|
|||||||
android:paddingStart="3dp"
|
android:paddingStart="3dp"
|
||||||
android:paddingEnd="3dp"
|
android:paddingEnd="3dp"
|
||||||
android:paddingTop="1dp"
|
android:paddingTop="1dp"
|
||||||
android:visibility="gone"
|
|
||||||
android:textColor="@color/md_white_1000"
|
android:textColor="@color/md_white_1000"
|
||||||
|
android:visibility="gone"
|
||||||
tools:visibility="visible"
|
tools:visibility="visible"
|
||||||
tools:text="120"
|
tools:text="120"
|
||||||
app:layout_constraintStart_toEndOf="@+id/download_text"
|
app:layout_constraintStart_toEndOf="@+id/download_text"
|
||||||
@ -124,6 +124,8 @@
|
|||||||
android:id="@+id/unread_badge"
|
android:id="@+id/unread_badge"
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:src="@drawable/unread_circle_badge"/>
|
android:src="@drawable/unread_circle_badge"/>
|
||||||
|
|
||||||
|
@ -120,6 +120,8 @@
|
|||||||
android:id="@+id/unread_badge"
|
android:id="@+id/unread_badge"
|
||||||
android:layout_width="10dp"
|
android:layout_width="10dp"
|
||||||
android:layout_height="10dp"
|
android:layout_height="10dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<eu.kanade.tachiyomi.ui.library.filter.SortFilterBottomSheet xmlns:android="http://schemas.android.com/apk/res/android"
|
<eu.kanade.tachiyomi.ui.library.filter.SortFilterBottomSheet xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/bottom_sheet"
|
android:id="@+id/bottom_sheet"
|
||||||
style="@style/BottomSheetDialogTheme"
|
style="@style/BottomSheetDialogTheme"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -91,7 +92,7 @@
|
|||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:gravity="start|center"
|
android:gravity="start|center"
|
||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
android:text="srgdg"
|
tools:text="Library Sort"
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
@ -110,7 +111,7 @@
|
|||||||
android:textAlignment="textStart"
|
android:textAlignment="textStart"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:gravity="start|center"
|
android:gravity="start|center"
|
||||||
android:text="srgdg"
|
tools:text="Category Sort"
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
@ -202,6 +203,7 @@
|
|||||||
android:id="@+id/top_bar"
|
android:id="@+id/top_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
tools:visibility="invisible"
|
||||||
android:background="@drawable/bg_bottom_sheet_primary"
|
android:background="@drawable/bg_bottom_sheet_primary"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<eu.kanade.tachiyomi.ui.library.filter.FilterTagGroup xmlns:android="http://schemas.android.com/apk/res/android"
|
<eu.kanade.tachiyomi.ui.library.filter.FilterTagGroup xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:orientation="horizontal" android:layout_width="wrap_content"
|
android:orientation="horizontal" android:layout_width="wrap_content"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:background="@drawable/round_textview_border"
|
android:background="@drawable/round_textview_border"
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:layout_marginEnd="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
@ -17,7 +18,7 @@
|
|||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:textStyle="normal"
|
android:textStyle="normal"
|
||||||
android:text="112"
|
tools:text="Item 1"
|
||||||
android:paddingStart="20dp"
|
android:paddingStart="20dp"
|
||||||
android:paddingEnd="20dp"/>
|
android:paddingEnd="20dp"/>
|
||||||
|
|
||||||
@ -39,7 +40,7 @@
|
|||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:textStyle="normal"
|
android:textStyle="normal"
|
||||||
android:text="112"
|
tools:text="Item 2"
|
||||||
android:paddingStart="20dp"
|
android:paddingStart="20dp"
|
||||||
android:paddingEnd="20dp"/>
|
android:paddingEnd="20dp"/>
|
||||||
|
|
||||||
@ -61,7 +62,7 @@
|
|||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:textStyle="normal"
|
android:textStyle="normal"
|
||||||
android:text="112"
|
tools:text="Item 3"
|
||||||
android:paddingStart="20dp"
|
android:paddingStart="20dp"
|
||||||
android:paddingEnd="20dp"/>
|
android:paddingEnd="20dp"/>
|
||||||
</eu.kanade.tachiyomi.ui.library.filter.FilterTagGroup>
|
</eu.kanade.tachiyomi.ui.library.filter.FilterTagGroup>
|
@ -168,6 +168,11 @@
|
|||||||
<string name="pref_enable_automatic_updates">Check for updates</string>
|
<string name="pref_enable_automatic_updates">Check for updates</string>
|
||||||
<string name="pref_enable_automatic_updates_summary">Automatically check for new app versions</string>
|
<string name="pref_enable_automatic_updates_summary">Automatically check for new app versions</string>
|
||||||
<string name="use_bottom_nav">Use bottom navigation</string>
|
<string name="use_bottom_nav">Use bottom navigation</string>
|
||||||
|
<string name="switch_to_sidebar">Switch to navigation drawer?</string>
|
||||||
|
<string name="switch_to_sidebar_summary">Navigation drawer is no longer supported by this
|
||||||
|
version of Tachiyomi and will later be removed. Non-critical bugs and features
|
||||||
|
relating to it will be ignored.</string>
|
||||||
|
<string name="action_switch">Switch</string>
|
||||||
|
|
||||||
<!-- Library section -->
|
<!-- Library section -->
|
||||||
<string name="pref_category_library_display">Display</string>
|
<string name="pref_category_library_display">Display</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user