forked from organicmaps/organicmaps
Merge pull request #3404 from igrechuhin/crash
[ios] Fixed crash on app start if location is denied.
This commit is contained in:
commit
04c09e194e
2 changed files with 8 additions and 6 deletions
|
@ -58,7 +58,6 @@ NSArray<UIImage *> * animationImages(NSString * animationTemplate, NSUInteger im
|
|||
self.sideView.topBound = 0.0;
|
||||
self.sideView.bottomBound = view.height;
|
||||
self.zoomSwipeEnabled = NO;
|
||||
[self processMyPositionStateModeEvent:location::PendingPosition];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -125,11 +124,14 @@ NSArray<UIImage *> * animationImages(NSString * animationTemplate, NSUInteger im
|
|||
}
|
||||
}
|
||||
(self.locationMode, mode);
|
||||
locBtn.imageView.animationDuration = 0.0;
|
||||
locBtn.imageView.animationImages = images;
|
||||
locBtn.imageView.animationRepeatCount = 1;
|
||||
locBtn.imageView.image = images.lastObject;
|
||||
[locBtn.imageView startAnimating];
|
||||
if (images)
|
||||
{
|
||||
locBtn.imageView.animationDuration = 0.0;
|
||||
locBtn.imageView.animationRepeatCount = 1;
|
||||
locBtn.imageView.image = images.lastObject;
|
||||
[locBtn.imageView startAnimating];
|
||||
}
|
||||
[self refreshLocationButtonState:mode];
|
||||
self.locationMode = mode;
|
||||
}
|
||||
|
|
|
@ -397,6 +397,7 @@ BOOL gIsFirstMyPositionMode = YES;
|
|||
return;
|
||||
self.view.clipsToBounds = YES;
|
||||
[MTRGManager setMyCom:YES];
|
||||
[self processMyPositionStateModeEvent:location::PendingPosition];
|
||||
}
|
||||
|
||||
- (void)mwm_refreshUI
|
||||
|
@ -529,7 +530,6 @@ BOOL gIsFirstMyPositionMode = YES;
|
|||
self.menuRestoreState = MWMBottomMenuStateInactive;
|
||||
GetFramework().LoadBookmarks();
|
||||
[MWMFrameworkListener addObserver:self];
|
||||
[self processMyPositionStateModeEvent:location::PendingPosition];
|
||||
}
|
||||
|
||||
#pragma mark - Open controllers
|
||||
|
|
Loading…
Add table
Reference in a new issue