Merge pull request #252 from igrechuhin/ig-bug

[ios] Fixed location button state restore on enter foreground.
This commit is contained in:
Vlad Mihaylenko 2015-10-15 14:06:01 +03:00
commit 1b7e80cd3e
5 changed files with 17 additions and 0 deletions

View file

@ -19,6 +19,8 @@
- (instancetype)initWithParentController:(MapViewController *)controller
delegate:(id<MWMBottomMenuControllerProtocol>)delegate;
- (void)onEnterForeground;
- (void)setStreetName:(NSString *)streetName;
- (void)setPlanning;
- (void)setGo;

View file

@ -103,6 +103,11 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell)
GetFramework().GetLocationState()->RemoveStateModeListener(self.locationListenerSlot);
}
- (void)onEnterForeground
{
[self onLocationStateModeChanged:GetFramework().GetLocationState()->GetMode()];
}
#pragma mark - Layout
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation

View file

@ -17,6 +17,8 @@
- (instancetype)init __attribute__((unavailable("init is not available")));
- (instancetype)initWithParentController:(MapViewController *)controller;
- (void)onEnterForeground;
#pragma mark - Layout
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation

View file

@ -59,6 +59,11 @@ extern NSString * const kAlohalyticsTapEventKey;
return self;
}
- (void)onEnterForeground
{
[self.menuController onEnterForeground];
}
#pragma mark - Layout
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation

View file

@ -493,7 +493,10 @@ typedef NS_ENUM(NSUInteger, UserTouchesAction)
GetFramework().EnterForeground();
if (self.isViewLoaded && self.view.window)
{
[self invalidate]; // only invalidate when map is displayed on the screen
[self.controlsManager onEnterForeground];
}
}
- (void)viewWillAppear:(BOOL)animated