Hide irrelevant settings on tablets
This commit is contained in:
@@ -17,6 +17,7 @@ import eu.kanade.tachiyomi.util.preference.preferenceCategory
|
||||
import eu.kanade.tachiyomi.util.preference.switchPreference
|
||||
import eu.kanade.tachiyomi.util.preference.titleRes
|
||||
import eu.kanade.tachiyomi.util.system.LocaleHelper
|
||||
import eu.kanade.tachiyomi.util.system.isTablet
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
import java.util.Date
|
||||
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
||||
@@ -45,10 +46,12 @@ class SettingsGeneralController : SettingsController() {
|
||||
titleRes = R.string.pref_confirm_exit
|
||||
defaultValue = false
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.hideBottomBar
|
||||
titleRes = R.string.pref_hide_bottom_bar_on_scroll
|
||||
defaultValue = true
|
||||
if (!context.isTablet()) {
|
||||
switchPreference {
|
||||
key = Keys.hideBottomBar
|
||||
titleRes = R.string.pref_hide_bottom_bar_on_scroll
|
||||
defaultValue = true
|
||||
}
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
|
||||
@@ -28,6 +28,7 @@ import eu.kanade.tachiyomi.util.preference.preferenceCategory
|
||||
import eu.kanade.tachiyomi.util.preference.summaryRes
|
||||
import eu.kanade.tachiyomi.util.preference.switchPreference
|
||||
import eu.kanade.tachiyomi.util.preference.titleRes
|
||||
import eu.kanade.tachiyomi.util.system.isTablet
|
||||
import eu.kanade.tachiyomi.widget.MinMaxNumberPicker
|
||||
import eu.kanade.tachiyomi.widget.materialdialogs.QuadStateCheckBox
|
||||
import eu.kanade.tachiyomi.widget.materialdialogs.listItemsQuadStateMultiChoice
|
||||
@@ -75,10 +76,12 @@ class SettingsLibraryController : SettingsController() {
|
||||
}
|
||||
.launchIn(viewScope)
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.jumpToChapters
|
||||
titleRes = R.string.pref_jump_to_chapters
|
||||
defaultValue = false
|
||||
if (!context.isTablet()) {
|
||||
switchPreference {
|
||||
key = Keys.jumpToChapters
|
||||
titleRes = R.string.pref_jump_to_chapters
|
||||
defaultValue = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user