forked from organicmaps/organicmaps-tmp
Merge pull request #252 from igrechuhin/ig-bug
[ios] Fixed location button state restore on enter foreground.
This commit is contained in:
commit
1b7e80cd3e
5 changed files with 17 additions and 0 deletions
|
@ -19,6 +19,8 @@
|
|||
- (instancetype)initWithParentController:(MapViewController *)controller
|
||||
delegate:(id<MWMBottomMenuControllerProtocol>)delegate;
|
||||
|
||||
- (void)onEnterForeground;
|
||||
|
||||
- (void)setStreetName:(NSString *)streetName;
|
||||
- (void)setPlanning;
|
||||
- (void)setGo;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -59,6 +59,11 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)onEnterForeground
|
||||
{
|
||||
[self.menuController onEnterForeground];
|
||||
}
|
||||
|
||||
#pragma mark - Layout
|
||||
|
||||
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue