From baa98f25c5987e0eea967ee7f00c96ca3c57de5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Wed, 26 May 2021 19:09:10 +0200 Subject: [PATCH] [UI] Fix easter egg prize receiving. --- .../edziennik/ui/modules/login/LoginEggsFragment.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/login/LoginEggsFragment.kt b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/login/LoginEggsFragment.kt index 0c11bb5a..a6b688b2 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/login/LoginEggsFragment.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/login/LoginEggsFragment.kt @@ -95,8 +95,10 @@ class LoginEggsFragment : Fragment(), CoroutineScope { anim.interpolator = AccelerateDecelerateInterpolator() anim.duration = 10 anim.fillAfter = true - activity.getRootView().startAnimation(anim) - nav.navigate(R.id.loginPrizeFragment, null, activity.navOptions) + activity.runOnUiThread { + activity.getRootView().startAnimation(anim) + nav.navigate(R.id.loginPrizeFragment, null, activity.navOptions) + } } }, "EggInterface") loadUrl("https://szkolny.eu/game/runner.html")