Prevent an IllegalStateException crash in the remote access onboarding

This commit is contained in:
Nicolas Pomepuy 2024-10-17 11:57:50 +02:00 committed by Duncan McNamara
parent 69a4d8eb37
commit c19292f62d

View File

@ -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) {
}
}
}