rundfunk47 / stinsen

Coordinators in SwiftUI. Simple, powerful and elegant.
MIT License
907 stars 95 forks source link

Unwanted popping/re-pushing when on navigation coordinator #22

Closed jblanco-applaudostudios closed 3 years ago

jblanco-applaudostudios commented 3 years ago

Hello, I'm having an issue with the navigation stacks. I have a SidebarCoordinator that has a SplitviewCoordinator inside of it (both are custom coordinators I made). The SplitviewCoordinator shows two NavigationCoordinators side by side.

I'm having a problem that whenever I show or hide the sidebar, if any of the navigation stacks is not on the root it will pop and then re-push the current view on said stack. Is this a known issue? Or perhaps a mistake I made while coding the coordinator view?

rundfunk47 commented 3 years ago

Hi! Can't say I've really noticed that before no. Would it be possible for you to reproduce the issue in a small example app where I can see what's happening?

rundfunk47 commented 3 years ago

Hi! There's a version 2.0.0 now that relies on isActive instead of onAppear to set the navigation stack, which I suspect might have been the cause of the issue. Please try it and see if it resolves it!

jblanco-applaudostudios commented 3 years ago

Thanks, I'm working on migrating to 2.0.0!