forked from organicmaps/organicmaps
[MAPSME-3877] [ios] Fixed my position mode on first launch.
This commit is contained in:
parent
7db6ee4725
commit
1b444565e6
1 changed files with 14 additions and 9 deletions
|
@ -405,19 +405,24 @@ BOOL gIsFirstMyPositionMode = YES;
|
|||
case location::NotFollowNoPosition:
|
||||
{
|
||||
BOOL const hasLocation = [MWMLocationManager lastLocation] != nil;
|
||||
if (hasLocation || (gIsFirstMyPositionMode && ![Alohalytics isFirstSession]))
|
||||
if (hasLocation)
|
||||
{
|
||||
GetFramework().SwitchMyPositionNextMode();
|
||||
break;
|
||||
}
|
||||
else
|
||||
if ([Alohalytics isFirstSession])
|
||||
break;
|
||||
if (gIsFirstMyPositionMode)
|
||||
{
|
||||
BOOL const isMapVisible = (self.navigationController.visibleViewController == self);
|
||||
if (isMapVisible && ![MWMLocationManager isLocationProhibited])
|
||||
{
|
||||
[self.alertController presentLocationNotFoundAlertWithOkBlock:^{
|
||||
GetFramework().SwitchMyPositionNextMode();
|
||||
}];
|
||||
}
|
||||
GetFramework().SwitchMyPositionNextMode();
|
||||
break;
|
||||
}
|
||||
BOOL const isMapVisible = (self.navigationController.visibleViewController == self);
|
||||
if (isMapVisible && ![MWMLocationManager isLocationProhibited])
|
||||
{
|
||||
[self.alertController presentLocationNotFoundAlertWithOkBlock:^{
|
||||
GetFramework().SwitchMyPositionNextMode();
|
||||
}];
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue