diff options
author | Jason Wray <jason@mapbox.com> | 2019-08-20 16:11:11 -0700 |
---|---|---|
committer | Jason Wray <friedbunny@users.noreply.github.com> | 2019-08-21 12:14:20 -0700 |
commit | 0e57c7de4401ed67854b64b1bbc26edf04e2e07c (patch) | |
tree | 78e56c481631946d1a1c22a129a887ed02ef1f1c /platform/ios/src/MGLMapView.mm | |
parent | c3cd9002f0f59ff6955c75410aaae62fb782935d (diff) | |
download | qtlocation-mapboxgl-0e57c7de4401ed67854b64b1bbc26edf04e2e07c.tar.gz |
[ios] Refactor NSUserDefaults key variable names
Diffstat (limited to 'platform/ios/src/MGLMapView.mm')
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 51102233cf..d242feb38d 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -2425,7 +2425,7 @@ public: NSString *message; NSString *participateTitle; NSString *declineTitle; - if ([[NSUserDefaults standardUserDefaults] boolForKey:@"MGLMapboxMetricsEnabled"]) + if ([[NSUserDefaults standardUserDefaults] boolForKey:MGLMapboxMetricsEnabledKey]) { message = NSLocalizedStringWithDefaultValue(@"TELEMETRY_ENABLED_MSG", nil, nil, @"You are helping to make OpenStreetMap and Mapbox maps better by contributing anonymous usage data.", @"Telemetry prompt message"); participateTitle = NSLocalizedStringWithDefaultValue(@"TELEMETRY_ENABLED_ON", nil, nil, @"Keep Participating", @"Telemetry prompt button"); @@ -2453,14 +2453,14 @@ public: UIAlertAction *declineAction = [UIAlertAction actionWithTitle:declineTitle style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { - [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"MGLMapboxMetricsEnabled"]; + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:MGLMapboxMetricsEnabledKey]; }]; [alertController addAction:declineAction]; UIAlertAction *participateAction = [UIAlertAction actionWithTitle:participateTitle style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { - [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"MGLMapboxMetricsEnabled"]; + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:MGLMapboxMetricsEnabledKey]; }]; [alertController addAction:participateAction]; |