mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-09-17 23:12:27 +00:00
Re-added bypass rotation prevention.
This commit is contained in:
parent
66f9824b68
commit
ff8d7558d4
1 changed files with 5 additions and 0 deletions
|
@ -96,6 +96,7 @@ class VideoDetailFragment : MainFragment {
|
||||||
val a = activity ?: return
|
val a = activity ?: return
|
||||||
val isMaximized = state == State.MAXIMIZED
|
val isMaximized = state == State.MAXIMIZED
|
||||||
val isFullScreenPortraitAllowed = Settings.instance.playback.fullscreenPortrait;
|
val isFullScreenPortraitAllowed = Settings.instance.playback.fullscreenPortrait;
|
||||||
|
val bypassRotationPrevention = Settings.instance.other.bypassRotationPrevention;
|
||||||
val currentRequestedOrientation = a.requestedOrientation
|
val currentRequestedOrientation = a.requestedOrientation
|
||||||
val currentOrientation = if (_currentOrientation == -1) currentRequestedOrientation else _currentOrientation
|
val currentOrientation = if (_currentOrientation == -1) currentRequestedOrientation else _currentOrientation
|
||||||
val isAutoRotate = Settings.instance.playback.isAutoRotate()
|
val isAutoRotate = Settings.instance.playback.isAutoRotate()
|
||||||
|
@ -113,6 +114,10 @@ class VideoDetailFragment : MainFragment {
|
||||||
} else {
|
} else {
|
||||||
a.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
|
a.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
|
||||||
}
|
}
|
||||||
|
} else if (bypassRotationPrevention) {
|
||||||
|
if (isAutoRotate) {
|
||||||
|
a.requestedOrientation = currentOrientation
|
||||||
|
}
|
||||||
} else if (currentOrientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT || currentOrientation == ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT) {
|
} else if (currentOrientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT || currentOrientation == ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT) {
|
||||||
if (isAutoRotate) {
|
if (isAutoRotate) {
|
||||||
a.requestedOrientation = currentOrientation
|
a.requestedOrientation = currentOrientation
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue