Skip to content
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

Pilot PopTo Doesn't Work with Parameters #30

Open
Eli017 opened this issue Nov 9, 2022 · 1 comment
Open

Pilot PopTo Doesn't Work with Parameters #30

Eli017 opened this issue Nov 9, 2022 · 1 comment

Comments

@Eli017
Copy link

Eli017 commented Nov 9, 2022

I have a project that utilizes parameters within its routing. While using pilot.push(.Locations(status: Status.none)) works, doing pilot.pop(.Locations(status: Status.none)) doesn't work. When I used the debugger, I noticed that the internal popTo function navigated to the the log statement UIPilot - Route not found.
If I had to take a guess on what is wrong, I think exact matching might with Equatable might not be right. This is because when doing .Locations(status: Status.none), it's creating a new unique identifier for that route? Maybe if it was checking for a route name instead, it might work?

iOS Target: 14.1
Swift: 5.7
UIPilot: 1.3.1

@jimmy0251
Copy link
Member

Hi @Eli017 , UIPilot uses Equatable to see if any matching route is in the stack, so maybe you should check if you have implemented Equatable correctly on your routes enum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants