Browse Source

Prevent an IllegalStateException crash in the remote access onboarding

merge-requests/1990/merge
Nicolas Pomepuy 2 years ago
committed by Duncan McNamara
parent
commit
c19292f62d
  1. 9
      application/webserver/src/main/java/org/videolan/vlc/webserver/gui/remoteaccess/onboarding/RemoteAccessOnboardingContentFragment.kt

9
application/webserver/src/main/java/org/videolan/vlc/webserver/gui/remoteaccess/onboarding/RemoteAccessOnboardingContentFragment.kt

@ -64,9 +64,12 @@ class RemoteAccessOnboardingContentFragment : RemoteAccessOnboardingFragment() {
animationLoop.playSequentially(appearingSets.toMutableList() as List<Animator>?)
animationLoop.doOnEnd {
lifecycleScope.launch {
viewLifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) {
delay(2000)
animationLoop.start()
try {
viewLifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) {
delay(2000)
animationLoop.start()
}
} catch (_: IllegalStateException) {
}
}
}

Loading…
Cancel
Save