mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-04-20 03:24:50 +00:00
Merge branch 'delay-tweak' into 'master'
increase delay to prevent erroneous rotations See merge request videostreaming/grayjay!58
This commit is contained in:
commit
2787e29a07
1 changed files with 4 additions and 2 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue