From e08e41ae0dd19bf5ca8190e7f5617007b3c90001 Mon Sep 17 00:00:00 2001 From: len Date: Fri, 8 Jul 2016 22:31:46 +0200 Subject: [PATCH] Remove most unused settings from the reader (keep screen on and page transitions), they are still available in the app's settings. Also lower minimum brightness to -75% --- .../tachiyomi/ui/reader/ReaderActivity.kt | 4 ++-- .../tachiyomi/ui/reader/ReaderSettingsDialog.kt | 17 +---------------- .../main/res/layout/dialog_reader_settings.xml | 14 +------------- 3 files changed, 4 insertions(+), 31 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt index 17a04bad7..5c825e5af 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt @@ -425,8 +425,8 @@ class ReaderActivity : BaseRxActivity() { } /** - * Sets the brightness of the screen. Range is [-50, 100]. - * From -50 to -1 a semi-transparent black view is shown at the top with the minimum brightness. + * Sets the brightness of the screen. Range is [-75, 100]. + * From -75 to -1 a semi-transparent black view is shown at the top with the minimum brightness. * From 1 to 100 it sets that value as brightness. * 0 sets system brightness and hides the overlay. */ diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsDialog.kt index b1a60f024..8e96f31a2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsDialog.kt @@ -77,11 +77,6 @@ class ReaderSettingsDialog : DialogFragment() { } background_color.setSelection(preferences.readerTheme().getOrDefault(), false) - enable_transitions.isChecked = preferences.enableTransitions().getOrDefault() - enable_transitions.setOnCheckedChangeListener { v, isChecked -> - preferences.enableTransitions().set(isChecked) - } - show_page_number.isChecked = preferences.showPageNumber().getOrDefault() show_page_number.setOnCheckedChangeListener { v, isChecked -> preferences.showPageNumber().set(isChecked) @@ -92,17 +87,7 @@ class ReaderSettingsDialog : DialogFragment() { preferences.fullscreen().set(isChecked) } - keep_screen_on.isChecked = preferences.keepScreenOn().getOrDefault() - keep_screen_on.setOnCheckedChangeListener { v, isChecked -> - preferences.keepScreenOn().set(isChecked) - } - - subscriptions += preferences.customBrightness().asObservable() - .subscribe { isEnabled -> - custom_brightness.isChecked = isEnabled - brightness_seekbar.isEnabled = isEnabled - } - + custom_brightness.isChecked = preferences.customBrightness().getOrDefault() custom_brightness.setOnCheckedChangeListener { v, isChecked -> preferences.customBrightness().set(isChecked) } diff --git a/app/src/main/res/layout/dialog_reader_settings.xml b/app/src/main/res/layout/dialog_reader_settings.xml index fa384b4f2..f78b724ae 100644 --- a/app/src/main/res/layout/dialog_reader_settings.xml +++ b/app/src/main/res/layout/dialog_reader_settings.xml @@ -159,12 +159,6 @@ - - - -