Fix for reader crash in < Android 9

This commit is contained in:
arkon 2020-08-01 12:10:28 -04:00
parent b8a98ef5e4
commit 85ed7a7457

View file

@ -658,9 +658,11 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
.onEach { setTrueColor(it) } .onEach { setTrueColor(it) }
.launchIn(scope) .launchIn(scope)
preferences.cutoutShort().asFlow() if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
.onEach { setCutoutShort(it) } preferences.cutoutShort().asFlow()
.launchIn(scope) .onEach { setCutoutShort(it) }
.launchIn(scope)
}
preferences.keepScreenOn().asFlow() preferences.keepScreenOn().asFlow()
.onEach { setKeepScreenOn(it) } .onEach { setKeepScreenOn(it) }