Browse Source

Fix for reader crash in < Android 9

arkon 4 năm trước cách đây
mục cha
commit
85ed7a7457

+ 5 - 3
app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt

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