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 2787e29a07

View file

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