Closed soupslurpr closed 3 months ago
@soupslurpr Can you explain this? Does it lose any functionality?
Oops I forgot to say. The only thing that's lost is when going from Donate (or other navigation
s but we don't have any others yet) to another nav bar entry and coming back, it goes back to Donate's startDestination instead of the screen it was on (like Cryptocurrencies for example).
I think the issue is some sort of race condition related to being in a sub-screen when setting the new startDestination when leaving the app.
Ideally it can be fixed properly. Any idea how to approach that?
Maybe this is the proper fix, I'm not sure what the cause of the issue is exactly. It being hard to reproduce makes it difficult to debug further.
@soupslurpr I mean a fix preserving restoring the current state fully.
Oh, I don't know if that's possible. It being hard to reproduce makes it difficult to try that.
Found how to reproduce consistently and I think I know the actual cause now.
To reproduce: go to Donate > Cryptocurrencies, then go to home screen. Go back into app and it should be at the Donate start screen. Go into Cryptocurrencies again, then go to Release Notes or Community. Now go to the home screen and the app will crash.
So the cause is just leaving Donate in a screen that isn't start when setting the new startDestination to another nav bar entry.
I'll try to find a better solution in 9 hours.
Fixed while preserving the restoration of the state!
To reproduce the crash (might take a few tries): go to Donate then GitHub Sponsors (or any other sub-screen I think) then go to the home screen. Come back to the app and go to the Community tab then go to the home screen again.