Cleaned up in-app opt-out property
Renamed the property to be consistent with the public class methods. Also removed a spurious #import of a .m file.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
@interface MGLAccountManager()
|
||||
|
||||
@property (atomic) BOOL showsOptOutInApp;
|
||||
@property (atomic) BOOL mapboxMetricsEnabledSettingShownInApp;
|
||||
@property (atomic) NSString *accessToken;
|
||||
|
||||
@end
|
||||
@@ -24,7 +24,7 @@ static MGLAccountManager *_sharedManager;
|
||||
if ( ! NSProcessInfo.processInfo.mgl_isInterfaceBuilderDesignablesAgent) {
|
||||
void (^setupBlock)() = ^{
|
||||
_sharedManager = [[self alloc] init];
|
||||
_sharedManager.showsOptOutInApp = NO;
|
||||
_sharedManager.mapboxMetricsEnabledSettingShownInApp = NO;
|
||||
};
|
||||
if ( ! [[NSThread currentThread] isMainThread]) {
|
||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||
@@ -39,12 +39,12 @@ static MGLAccountManager *_sharedManager;
|
||||
return _sharedManager;
|
||||
}
|
||||
|
||||
+ (void) setMapboxMetricsEnabledSettingShownInApp:(BOOL)showsOptOut {
|
||||
[MGLAccountManager sharedManager].showsOptOutInApp = showsOptOut;
|
||||
+ (void) setMapboxMetricsEnabledSettingShownInApp:(BOOL)shown {
|
||||
[MGLAccountManager sharedManager].mapboxMetricsEnabledSettingShownInApp = shown;
|
||||
}
|
||||
|
||||
+ (BOOL) mapboxMetricsEnabledSettingShownInApp {
|
||||
return [MGLAccountManager sharedManager].showsOptOutInApp;
|
||||
return [MGLAccountManager sharedManager].mapboxMetricsEnabledSettingShownInApp;
|
||||
}
|
||||
|
||||
+ (void) setAccessToken:(NSString *) accessToken {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#import "NSProcessInfo+MGLAdditions.h"
|
||||
#import "NSBundle+MGLAdditions.h"
|
||||
#import "NSException+MGLAdditions.h"
|
||||
#import "MGLAccountManager.m"
|
||||
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user