瀏覽代碼

Remove redundant Reading Mode header

arkon 4 年之前
父節點
當前提交
5452e29840
共有 1 個文件被更改,包括 39 次插入43 次删除
  1. 39 43
      app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt

+ 39 - 43
app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt

@@ -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 {
-            titleRes = R.string.pref_category_reading_mode
-
-            intListPreference {
-                key = Keys.defaultViewer
-                titleRes = R.string.pref_viewer_type
-                entriesRes = arrayOf(
-                    R.string.left_to_right_viewer, R.string.right_to_left_viewer,
-                    R.string.vertical_viewer, R.string.webtoon_viewer, R.string.vertical_plus_viewer
-                )
-                entryValues = arrayOf("1", "2", "3", "4", "5")
-                defaultValue = "2"
-                summary = "%s"
-            }
-            intListPreference {
-                key = Keys.doubleTapAnimationSpeed
-                titleRes = R.string.pref_double_tap_anim_speed
-                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))
-                entryValues = arrayOf("1", "500", "250") // using a value of 0 breaks the image viewer, so min is 1
-                defaultValue = "500"
-                summary = "%s"
-            }
-            switchPreference {
-                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 {
-                    key = Keys.trueColor
-                    titleRes = R.string.pref_true_color
-                    summaryRes = R.string.pref_true_color_summary
-                    defaultValue = false
-                }
-            }
+        intListPreference {
+            key = Keys.defaultViewer
+            titleRes = R.string.pref_viewer_type
+            entriesRes = arrayOf(
+                R.string.left_to_right_viewer, R.string.right_to_left_viewer,
+                R.string.vertical_viewer, R.string.webtoon_viewer, R.string.vertical_plus_viewer
+            )
+            entryValues = arrayOf("1", "2", "3", "4", "5")
+            defaultValue = "2"
+            summary = "%s"
+        }
+        intListPreference {
+            key = Keys.doubleTapAnimationSpeed
+            titleRes = R.string.pref_double_tap_anim_speed
+            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))
+            entryValues = arrayOf("1", "500", "250") // using a value of 0 breaks the image viewer, so min is 1
+            defaultValue = "500"
+            summary = "%s"
+        }
+        switchPreference {
+            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.cropBorders
-                titleRes = R.string.pref_crop_borders
+                key = Keys.trueColor
+                titleRes = R.string.pref_true_color
+                summaryRes = R.string.pref_true_color_summary
                 defaultValue = false
                 defaultValue = false
             }
             }
-            switchPreference {
-                key = Keys.enableTransitions
-                titleRes = R.string.pref_page_transitions
-                defaultValue = true
-            }
+        }
+        switchPreference {
+            key = Keys.cropBorders
+            titleRes = R.string.pref_crop_borders
+            defaultValue = false
+        }
+        switchPreference {
+            key = Keys.enableTransitions
+            titleRes = R.string.pref_page_transitions
+            defaultValue = true
         }
         }
 
 
         preferenceCategory {
         preferenceCategory {