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

Dispatches ui update to main queue #91

Merged
merged 5 commits into from
Oct 22, 2019
Merged

Dispatches ui update to main queue #91

merged 5 commits into from
Oct 22, 2019

Conversation

esreli
Copy link
Contributor

@esreli esreli commented Sep 25, 2019

In testing the app built for iOS 13, a runtime error was encountered. This PR addresses that error.
#89

@esreli esreli requested a review from philium October 19, 2019 00:09
@@ -24,7 +24,9 @@ extension MapViewController {

mapView.locationDisplay.autoPanModeChangedHandler = { newAutoPanMode in
print("New autoPanMode: \(newAutoPanMode)")
self.gpsButton.setImage(self.mapView.locationDisplay.getImage(), for: .normal)
DispatchQueue.main.async {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize the map is always displayed (and therefore never goes away?), but for the sake of correctness, the autoPanModeChangedHandler should weakly capture self.

@esreli esreli requested a review from philium October 21, 2019 17:48
@esreli esreli merged commit 7cb801b into eli.patch Oct 22, 2019
@esreli esreli deleted the eli.ui-main-thread branch October 22, 2019 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants