summaryrefslogtreecommitdiff
path: root/ios
diff options
context:
space:
mode:
authorJason Wray <jason@kulturny.com>2015-09-08 11:43:55 -0400
committerJustin R. Miller <incanus@codesorcery.net>2015-09-11 15:29:24 -0700
commit7127cfebb5949e2bdb4ef86f8c192c7bdc04caed (patch)
tree990cedc1625f77709e7cc12fab70927c80bd349b /ios
parenta9ef04e2189f2fc9947cb54c71732760e5c8e0db (diff)
downloadqtlocation-mapboxgl-7127cfebb5949e2bdb4ef86f8c192c7bdc04caed.tar.gz
Fix build, only ask for location permission on user's instigation
Previously in #2265 we would ask for location permission at app startup if `!settings->showsUserLocation`. #2193 0a172a21fdc2a87473560fd7d45f4d495d95de91 changed the way we used `NSUserDefaults` and mostly removed the `settings` object, which broke #2265. Rather than fix our pestering location permissions ask at startup, this commit now only asks for location permissions when the user hits the locate-me button. Once a user grants permission, the user dot appears because a `userTrackingMode` is set, `showsUserLocation` is permanently set to `YES` in `NSUserDefaults` and is restored at launch.
Diffstat (limited to 'ios')
-rw-r--r--ios/app/MBXViewController.mm7
1 files changed, 0 insertions, 7 deletions
diff --git a/ios/app/MBXViewController.mm b/ios/app/MBXViewController.mm
index b323717702..d94e41b5f9 100644
--- a/ios/app/MBXViewController.mm
+++ b/ios/app/MBXViewController.mm
@@ -83,13 +83,6 @@ static NSUInteger const kStyleVersion = 8;
action:@selector(locateUser)];
[self restoreState:nil];
-
- if ( ! settings->showsUserLocation)
- {
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 2 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
- self.mapView.showsUserLocation = YES;
- });
- }
}
- (void)saveState:(__unused NSNotification *)notification