Remove redundant Reading Mode header

This commit is contained in:
arkon 2020-07-16 23:02:14 -04:00
parent 148f8e6d11
commit 5452e29840

View file

@ -22,52 +22,48 @@ class SettingsReaderController : SettingsController() {
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
titleRes = R.string.pref_category_reader titleRes = R.string.pref_category_reader
preferenceCategory { intListPreference {
titleRes = R.string.pref_category_reading_mode key = Keys.defaultViewer
titleRes = R.string.pref_viewer_type
intListPreference { entriesRes = arrayOf(
key = Keys.defaultViewer R.string.left_to_right_viewer, R.string.right_to_left_viewer,
titleRes = R.string.pref_viewer_type R.string.vertical_viewer, R.string.webtoon_viewer, R.string.vertical_plus_viewer
entriesRes = arrayOf( )
R.string.left_to_right_viewer, R.string.right_to_left_viewer, entryValues = arrayOf("1", "2", "3", "4", "5")
R.string.vertical_viewer, R.string.webtoon_viewer, R.string.vertical_plus_viewer defaultValue = "2"
) summary = "%s"
entryValues = arrayOf("1", "2", "3", "4", "5") }
defaultValue = "2" intListPreference {
summary = "%s" key = Keys.doubleTapAnimationSpeed
} titleRes = R.string.pref_double_tap_anim_speed
intListPreference { entries = arrayOf(context.getString(R.string.double_tap_anim_speed_0), context.getString(R.string.double_tap_anim_speed_normal), context.getString(R.string.double_tap_anim_speed_fast))
key = Keys.doubleTapAnimationSpeed entryValues = arrayOf("1", "500", "250") // using a value of 0 breaks the image viewer, so min is 1
titleRes = R.string.pref_double_tap_anim_speed defaultValue = "500"
entries = arrayOf(context.getString(R.string.double_tap_anim_speed_0), context.getString(R.string.double_tap_anim_speed_normal), context.getString(R.string.double_tap_anim_speed_fast)) summary = "%s"
entryValues = arrayOf("1", "500", "250") // using a value of 0 breaks the image viewer, so min is 1 }
defaultValue = "500" switchPreference {
summary = "%s" key = Keys.showReadingMode
} titleRes = R.string.pref_show_reading_mode
summaryRes = R.string.pref_show_reading_mode_summary
defaultValue = true
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
switchPreference { switchPreference {
key = Keys.showReadingMode key = Keys.trueColor
titleRes = R.string.pref_show_reading_mode titleRes = R.string.pref_true_color
summaryRes = R.string.pref_show_reading_mode_summary summaryRes = R.string.pref_true_color_summary
defaultValue = true
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
switchPreference {
key = Keys.trueColor
titleRes = R.string.pref_true_color
summaryRes = R.string.pref_true_color_summary
defaultValue = false
}
}
switchPreference {
key = Keys.cropBorders
titleRes = R.string.pref_crop_borders
defaultValue = false defaultValue = false
} }
switchPreference { }
key = Keys.enableTransitions switchPreference {
titleRes = R.string.pref_page_transitions key = Keys.cropBorders
defaultValue = true titleRes = R.string.pref_crop_borders
} defaultValue = false
}
switchPreference {
key = Keys.enableTransitions
titleRes = R.string.pref_page_transitions
defaultValue = true
} }
preferenceCategory { preferenceCategory {