Skip to content

Commit ed55cb2

Browse files
authored
Lock orientation when using the rotate button (#2172)
1 parent 523fbc1 commit ed55cb2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
142142
protected var doubleTapEnabled = false
143143
protected var doubleTapPauseEnabled = true
144144
protected var playerRotateEnabled = false
145+
protected var rotatedManually = false
145146
protected var autoPlayerRotateEnabled = false
146147
private var hideControlsNames = false
147148
protected var speedupEnabled = false
@@ -450,7 +451,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
450451
if (isLocked) {
451452
lockOrientation(this)
452453
} else {
453-
if (ignoreDynamicOrientation) {
454+
if (ignoreDynamicOrientation || rotatedManually) {
454455
// restore when lock is disabled
455456
restoreOrientationWithSensor(this)
456457
} else {
@@ -2031,6 +2032,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
20312032
private fun toggleRotate() {
20322033
activity?.let {
20332034
toggleOrientationWithSensor(it)
2035+
rotatedManually = true
20342036
}
20352037
}
20362038

0 commit comments

Comments
 (0)