I have a question about a behavior that I didn't expect.
1. I have a
@Composable
fun ForgotPasswordScreen(successEvent: () -> Unit, vm: ForgotPasswordScreenViewModel){
...
~buttonOnClick {
vm.makeNetworkCall(successEvent)
}
...
}
2. successEvent: () -> Unit, is a navigational event that takes me back to SignInScreen
3. ForgotPasswordScreenViewModel has
fun makeNetworkCall(onNetworkCallCompletedSuccessfully: () -> Unit)
and on completion of the network call,
if (call.isSuccessful) successEvent()
When I throttle the network call (for testing) it takes like 10 seconds, and I background the app, wait 20+ seconds... and I come back in the app, I can see that the app navigated successfully and the SignInScreen is showing. I guess I was wrong in thinking that the successEvent() wouldn't have any action since the app was backgrounded?