canopas/UIPilot

Pilot PopTo Doesn't Work with Parameters

Eli017 opened this issue · 1 comments

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

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.