Fix reader bug on certain orientation settings

Resolve #68
This commit is contained in:
FooIbar committed 2023-10-21 00:12:52 +08:00
1 parent 2f0571e384
commit 6e59583dea
1 file changed
+6 -1
@@ -190,7 +190,12 @@ class ReaderActivity : EhActivity() {
}
private fun buildProvider(replace: Boolean = false) {
if (setOrientation(ReaderPreferences.defaultOrientationType().get())) return
// TODO: Better solution for this dirty workaround
if (setOrientation(ReaderPreferences.defaultOrientationType().get())) {
// Orientation changed, we don't know if the activity will recreate, just recreate anyway
recreate()
return
}
if (mGalleryProvider != null) {
if (replace) mGalleryProvider!!.stop() else return