mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-04-30 14:44:27 +02:00
increase delay to prevent erroneous rotations
This commit is contained in:
parent
9b3f90f922
commit
c77a4d08d6
@ -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()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user