SwiftUI Optimisation#76
Conversation
| self.mapViewController.hideEndOfRoute { _ in | ||
| self.delegate?.navigationViewControllerDidFinishRouting?(self) | ||
| } |
There was a problem hiding this comment.
I've verified that this is called regardless if showsEndOfRouteFeedback is set to true or false.
|
|
||
| self.voiceController = nil | ||
| self.route = nil | ||
| self.locationManager = NavigationLocationManager() |
There was a problem hiding this comment.
Resets LocationManager in case a SimulatedLocationManager was used
|
Hi @Patrick-Kladek - |
|
@michaelkirk Sure, this PR is about fixing small things we've missed in #54. It has 3 small changes, I hope you don't want me to submit 3 PRs 😅, that's why I included it here. I've already got the approval from my team, so it's ready to review here too. |
Well when you phrase it like that it makes me feel crazy 😆, but to be honest, it certainly would be my preference if they are separate! It makes it easier to talk about separate concerns. For example, I have no concerns with: But 4111671 seems like the wrong fix. Since location manger is per-route, not per-view-controller, it probably makes more sense to set it in And as for 427721a, In my own application, I was calling hideEndOfRoute in my application logic, but I think you're right that we should probably include this in the library. However, I don't think it makes sense to call What do you think? |
Some good questions by Michael, lets wait for Patrick K's response.
|
Good point that the LocationManager is per Route, I fixed that.
I checked that the |
michaelkirk
left a comment
There was a problem hiding this comment.
Good point that the LocationManager is per Route, I fixed that.
👍
hideEndOfRoute has no side effects, it will simply remove the built-in feedback view if it's in the view hierarchy. If you want to provide your own, you do it differently anyway by listening to the delegate method navigationViewControllerDidFinishRouting().
Ok, I don't feel that strongly about this one.
Description
We are wrapping MapLibre-navigation in a
UIViewControllerRepresentable. TheupdateUIViewControllerfunction is run multiple times leading to setting the same variable over and over.Open Tasks
navigationViewControllerDidFinishRoutingwhen confirmed via buttonInfos for Reviewer