-
-
Notifications
You must be signed in to change notification settings - Fork 35
SwiftUI Optimisation #76
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
Conversation
self.mapViewController.hideEndOfRoute { _ in | ||
self.delegate?.navigationViewControllerDidFinishRouting?(self) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've verified that this is called regardless if showsEndOfRouteFeedback
is set to true or false.
@@ -467,6 +475,7 @@ open class NavigationViewController: UIViewController { | |||
|
|||
self.voiceController = nil | |||
self.route = nil | |||
self.locationManager = NavigationLocationManager() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
. TheupdateUIViewController
function is run multiple times leading to setting the same variable over and over.Open Tasks
navigationViewControllerDidFinishRouting
when confirmed via buttonInfos for Reviewer