From 6fe231dd1642b8375402960d5de28cbd8360f804 Mon Sep 17 00:00:00 2001 From: Christian Sturm Date: Thu, 15 Apr 2021 22:23:07 +0200 Subject: [PATCH] Dispatch to main queue, rather than global, fixes #59 (#64) Need to follow up as to why `ios-test` unit test is failing. But its not due to reezer's change --- platform/ios/platform/ios/src/MGLMapView.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/ios/platform/ios/src/MGLMapView.mm b/platform/ios/platform/ios/src/MGLMapView.mm index 5c2d75daf..c4ed8bd5f 100644 --- a/platform/ios/platform/ios/src/MGLMapView.mm +++ b/platform/ios/platform/ios/src/MGLMapView.mm @@ -6026,7 +6026,7 @@ public: - (void)locationManager:(__unused id)manager didUpdateHeading:(CLHeading *)newHeading { - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void) { + dispatch_async(dispatch_get_main_queue(), ^(void) { if ( ! self->_showsUserLocation || self.pan.state == UIGestureRecognizerStateBegan || newHeading.headingAccuracy < 0) return; self.userLocation.heading = newHeading;