mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-30 07:15:00 -05:00
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%
This commit is contained in:
parent
5f1a89df63
commit
e08e41ae0d
3 changed files with 4 additions and 31 deletions
|
@ -425,8 +425,8 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
|
|||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -159,12 +159,6 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
android:id="@+id/enable_transitions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pref_enable_transitions"/>
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
android:id="@+id/show_page_number"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -177,12 +171,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:text="@string/pref_fullscreen"/>
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
android:id="@+id/keep_screen_on"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pref_keep_screen_on"/>
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
android:id="@+id/custom_brightness"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -193,7 +181,7 @@
|
|||
android:id="@+id/brightness_seekbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:dsb_min="-50"
|
||||
app:dsb_min="-75"
|
||||
app:dsb_max="100"
|
||||
app:dsb_indicatorFormatter="%d%%"
|
||||
app:dsb_indicatorTextAppearance="@style/TextAppearance.Regular"
|
||||
|
|
Loading…
Reference in a new issue