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
This commit is contained in:
Christian Sturm
2021-04-15 22:23:07 +02:00
committed by GitHub
parent d716b5b408
commit 6fe231dd16

View File

@@ -6026,7 +6026,7 @@ public:
- (void)locationManager:(__unused id<MGLLocationManager>)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;