Merge branch 'delay-tweak' into 'master'

increase delay to prevent erroneous rotations

See merge request videostreaming/grayjay!58
This commit is contained in:
Kai DeLorenzo 2024-12-13 05:02:23 +00:00
commit 2c54a42c59

View file

@ -388,11 +388,13 @@ class VideoDetailFragment() : MainFragment() {
updateOrientation()
}
val delayBeforeRemoveRotationLock = 800L
_landscapeOrientationListener = LandscapeOrientationListener(requireContext())
{
CoroutineScope(Dispatchers.Main).launch {
// delay to make sure that the system auto rotate updates
delay(300)
delay(delayBeforeRemoveRotationLock)
_lastSetOrientation = Configuration.ORIENTATION_LANDSCAPE
updateOrientation()
}
@ -401,7 +403,7 @@ class VideoDetailFragment() : MainFragment() {
{
CoroutineScope(Dispatchers.Main).launch {
// delay to make sure that the system auto rotate updates
delay(300)
delay(delayBeforeRemoveRotationLock)
_lastSetOrientation = Configuration.ORIENTATION_PORTRAIT
updateOrientation()
}