Merge pull request #3404 from igrechuhin/crash

[ios] Fixed crash on app start if location is denied.
This commit is contained in:
Vlad Mihaylenko 2016-06-01 17:00:41 +04:00
commit 04c09e194e
2 changed files with 8 additions and 6 deletions

View file

@ -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;
}

View file

@ -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