diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index 1ac731958b..9ccbaa2e54 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -577,9 +577,9 @@ NSString * const kUDViralAlertWasShown = @"ViralAlertWasShown"; [[MapsAppDelegate theApp].locationManager start:self]; break; case location::NotFollowNoPosition: - //TODO(iOS team): show dialog if it is not first launch self.disableStandbyOnLocationStateMode = NO; - if (![Alohalytics isFirstSession]) + if (![Alohalytics isFirstSession] && [MapsAppDelegate theApp].locationManager.isStarted) + { [self.alertController presentLocationNotFoundAlertWithOkBlock:^ { GetFramework().SwitchMyPositionNextMode(); @@ -588,6 +588,7 @@ NSString * const kUDViralAlertWasShown = @"ViralAlertWasShown"; { [[MapsAppDelegate theApp].locationManager stop:self]; }]; + } break; case location::NotFollow: self.disableStandbyOnLocationStateMode = NO; diff --git a/iphone/Maps/Platform/LocationManager.h b/iphone/Maps/Platform/LocationManager.h index e0ed79c8d9..a8d517d612 100644 --- a/iphone/Maps/Platform/LocationManager.h +++ b/iphone/Maps/Platform/LocationManager.h @@ -16,6 +16,8 @@ @interface LocationManager : NSObject +@property (nonatomic, readonly) BOOL isStarted; + - (void)start:(id )observer; - (void)stop:(id )observer; - (CLLocation *)lastLocation; diff --git a/iphone/Maps/Platform/LocationManager.mm b/iphone/Maps/Platform/LocationManager.mm index 0b04f64f36..f66253767a 100644 --- a/iphone/Maps/Platform/LocationManager.mm +++ b/iphone/Maps/Platform/LocationManager.mm @@ -25,7 +25,7 @@ static NSString * const kAlohalyticsLocationRequestAlwaysFailed = @"$locationAlw @property (nonatomic) CLLocationManager * locationManager; -@property (nonatomic) BOOL isStarted; +@property (nonatomic, readwrite) BOOL isStarted; @property (nonatomic) NSMutableSet * observers; @property (nonatomic) NSDate * lastLocationTime;