Open ziem opened 4 years ago
This issue impacts Blocket a fair amount, small but not insignificant. Looking at the code this might be a race condition?
in BaseLoginActivity.onCreate()
you call the fragment.onVisibilityChanged
keyboardController.keyboardVisibility.observe(this, Observer {
(navigationController.currentFragment as? FlowFragment<*>)?.onVisibilityChanged(it == true)
})
But the properties in that fragment aren't resolved until the fragment.onViewCreated
I am assuming that there is a theoretical chance here that the lifecycle of the fragment hasn't created the view yet.
If the root cause is hard to find / resolve could you maybe make sure not to access those properties if they've not been initialized? Or would that put the FlowFragment in an unknown state?
Summary
We sometimes see this issue when we launch Accound SDK login screen:
Environment
Details
Stacktrace:
Code:
Steps to reproduce
Open login screen. The issue happens very rarely.