-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS action handling not always working with Firebase calls #267
Comments
I'm also having the same issue, for some reason on some screens, |
Do we have any solution on this? |
maybe publisher disposed before receive event, but cancellation of Flow subscription done in async way, so we have small period when Flow still active and receive event, but Publisher already cancelled and can't receive new events.
try to change code to:
|
It seems that is working. I test all the flows and I will inform you. Regarding Android, it has the same problem. I should call GlobalScope.launch instead of viewModelScope.launch to play correctly. Do you have any suggestions here? |
iOS is not playing when I make a Firebase call and onSuccess I make another one directly. Any thoughts? |
I have something like this in ViewModel: viewModelScope.launch {
_profileActions.send(ProfileActions.GetUserDetails)
_profileActions.send(ProfileActions.GetUserStatistics)
} In every action, I make a call in Firebase, but the first call is not made. If I change viewModelScope -> GlobalScope, it plays correctly! |
I have the NewGameViewModel in commonMain Shared code of KMM.
I have also the NewGameScreen in iOS:
When I tap the button, startNewGameButtonTapped() function of viewModel is called and then the action CreateNewGameAction should be handled by iOS.
Sometimes it works and sometimes not. Maybe it is a lifecycle issue, but I am not sure and I do not know how to solve it. Do you have any ideas?
The text was updated successfully, but these errors were encountered: