Compare commits

...

2 Commits

Author SHA1 Message Date
Kai DeLorenzo 2787e29a07 Merge branch 'delay-tweak' into 'master'
increase delay to prevent erroneous rotations

See merge request videostreaming/grayjay!58
2024-12-13 05:02:23 +00:00
Kai c77a4d08d6 increase delay to prevent erroneous rotations 2024-12-12 23:01:28 -06:00
@@ -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()
}