-
Notifications
You must be signed in to change notification settings - Fork 3
Description
I have my own Turbo Native android app, that I was using the ViewFlipper for to handle bottom tab navigation. However, I noticed the same issues you brought up in #12. I saw your new implementation using supportFragmentManager and tried to implement in my app as well, but I discovered a new issue. I decided to run black candy locally to see if the same issue exists and it did. Here is what I am seeing:
- Launch the app and sign in
- Click the Library tab, observe the Rails logs show a single request to /library
- Rotate the device (I'm using the emulator)
- Observe the Rails logs now show a request for / and /library
- Rotate the device again
- Observe multiple requests to /library - each subsequent device rotation will increase the number of requests to /library every time.
I was able to debug to the point where I saw that in the MainActivity the libraryNavFragment is coming back as null after a device rotation, and therefore we call delegate.registerNavHostFragment(R.id.library_container) again, but the old "nav host fragment" must still be hanging around and executed somehow. I don't understand enough about Android and Turbo Native to have any good solutions. Do you have any ideas?