From 4189d62a57f5836c3fad9e7450dc1ec1d2a5956a Mon Sep 17 00:00:00 2001 From: Kai Date: Fri, 13 Dec 2024 20:47:21 -0600 Subject: [PATCH] fix rotation regression --- .../fragment/mainactivity/main/VideoDetailFragment.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailFragment.kt b/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailFragment.kt index e27acb48..7e8495d6 100644 --- a/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailFragment.kt +++ b/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailFragment.kt @@ -174,7 +174,11 @@ class VideoDetailFragment() : MainFragment() { // For small windows if the device isn't landscape right now and full screen portrait isn't allowed then we should force landscape if (isSmallWindow && isFullscreen && !isFullScreenPortraitAllowed && resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT && !rotationLock && isLandscapeVideo) { - a.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE + if (alwaysAllowReverseLandscapeAutoRotate){ + a.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE + } else { + a.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE + } if (autoRotateEnabled ) { // start listening for the device to rotate to landscape