increase delay to prevent erroneous rotations

This commit is contained in:
Kai 2024-12-12 23:01:28 -06:00
parent 9b3f90f922
commit c77a4d08d6
No known key found for this signature in database

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()
}