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 08de80701..bf359d5ea 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 @@ -495,13 +495,15 @@ class ReaderActivity : BaseRxActivity() { private fun setCustomBrightness(enabled: Boolean) { if (enabled) { customBrightnessSubscription = preferences.customBrightnessValue().asObservable() + .map { Math.max(0.01f, it) } .subscribe { setCustomBrightnessValue(it) } subscriptions.add(customBrightnessSubscription) } else { - if (customBrightnessSubscription != null) + if (customBrightnessSubscription != null) { subscriptions.remove(customBrightnessSubscription) - setCustomBrightnessValue(-1f) + } + setCustomBrightnessValue(WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_NONE) } }