-
Notifications
You must be signed in to change notification settings - Fork 131
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
Google Maps Wont restoreState properly when navigating through bottom nav #112
Comments
@thekingrenz23 Thank you for opening this issue. 🙏
This is an automated message, feel free to ignore. |
Still no upadate on this one? |
I can confirm the bug—thanks for reporting @thekingrenz23. The bug isn't immediately obvious so will need to do add some additional logging to pinpoint the issue. |
I tested a different scenario where a button toggles a mutableStateOf boolean that brings the |
You can reduce the occurrence of this error by omitting the default cross-fade transition for navHost. You can do this using : https://google.github.io/accompanist/navigation-animation/ |
hmmm I tried it with the default NavHost with no animation capability and still happens so it must not be the animation I guess? |
The default NavHost has a crossfade animation built in. |
Removing the animation is not an option for my project |
Looks like this issue happens you're in the tab displaying the map, and quickly tap out and back in (before the crossfade animation completes). In this specific scenario, the Edit: saving instance state will only restore some properties of the map (like the camera's position). Drawn objects like markers will have to be readded. The closest thing to a workaround for now is to shorten the crossfade duration to reduce the occurrence of this bug. |
🎉 This issue has been resolved in version 2.2.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Environment details
Steps to reproduce
Observation
The maps will load properly even if we navigate quickly on the bottom tabs when the starting route of nav host is the map to reproduce.
to
and it will work just fine.
Here is a sample video of the bug
The text was updated successfully, but these errors were encountered: