forked from organicmaps/organicmaps
[ios] Fix outdated badge update.
This commit is contained in:
parent
b8351c7519
commit
0022919fe9
4 changed files with 12 additions and 4 deletions
|
@ -20,5 +20,6 @@
|
|||
@property (nonatomic) NSUInteger outOfDateCount;
|
||||
|
||||
- (void)showAnimatedAfterDelay:(NSTimeInterval)delay;
|
||||
- (void)hide;
|
||||
|
||||
@end
|
||||
|
|
|
@ -36,6 +36,11 @@
|
|||
});
|
||||
}
|
||||
|
||||
- (void)hide
|
||||
{
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (void)expand
|
||||
{
|
||||
if (self.outOfDateCount == 0)
|
||||
|
|
|
@ -68,7 +68,6 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
|
||||
- (IBAction)menuActionOpenBookmarks
|
||||
{
|
||||
self.state = MWMSideMenuStateInactive;
|
||||
[Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"bookmarks"];
|
||||
BookmarksRootVC * const vc = [[BookmarksRootVC alloc] init];
|
||||
[self.controller.navigationController pushViewController:vc animated:YES];
|
||||
|
@ -76,13 +75,11 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
|
||||
- (IBAction)menuActionDownloadMaps
|
||||
{
|
||||
self.state = MWMSideMenuStateInactive;
|
||||
[self.controller pushDownloadMaps];
|
||||
}
|
||||
|
||||
- (IBAction)menuActionOpenSettings
|
||||
{
|
||||
self.state = MWMSideMenuStateInactive;
|
||||
[Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"settingsAndMore"];
|
||||
SettingsAndMoreVC * const vc = [[SettingsAndMoreVC alloc] initWithStyle:UITableViewStyleGrouped];
|
||||
[self.controller.navigationController pushViewController:vc animated:YES];
|
||||
|
@ -90,7 +87,6 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
|
||||
- (IBAction)menuActionShareLocation
|
||||
{
|
||||
self.state = MWMSideMenuStateInactive;
|
||||
[Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"share@"];
|
||||
CLLocation const * const location = [MapsAppDelegate theApp].m_locationManager.lastLocation;
|
||||
if (!location)
|
||||
|
@ -196,6 +192,7 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
{
|
||||
if (_state == state)
|
||||
return;
|
||||
[self.downloadBadge hide];
|
||||
switch (state)
|
||||
{
|
||||
case MWMSideMenuStateActive:
|
||||
|
|
|
@ -93,6 +93,7 @@ typedef NS_OPTIONS(NSUInteger, MapInfoView)
|
|||
@property (nonatomic) UIImageView * apiBar;
|
||||
@property (nonatomic) UILabel * apiTitleLabel;
|
||||
@property (nonatomic, readwrite) MWMMapViewControlsManager * controlsManager;
|
||||
@property (nonatomic) MWMSideMenuState menuRestoreState;
|
||||
|
||||
@property (nonatomic) ForceRoutingStateChange forceRoutingStateChange;
|
||||
@property (nonatomic) BOOL disableStandbyOnLocationStateMode;
|
||||
|
@ -565,6 +566,8 @@ typedef NS_OPTIONS(NSUInteger, MapInfoView)
|
|||
m_mapsObserverSlotId = GetFramework().GetCountryTree().GetActiveMapLayout().AddListener(m_mapsObserver);
|
||||
if (self.searchView.state == SearchViewStateFullscreen)
|
||||
[self.searchView setState:SearchViewStateFullscreen animated:NO];
|
||||
|
||||
self.controlsManager.menuState = self.menuRestoreState;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
|
@ -589,6 +592,7 @@ typedef NS_OPTIONS(NSUInteger, MapInfoView)
|
|||
firstTime = NO;
|
||||
[self setApiMode:_apiMode animated:NO];
|
||||
}
|
||||
self.menuRestoreState = self.controlsManager.menuState;
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated
|
||||
|
@ -664,6 +668,7 @@ typedef NS_OPTIONS(NSUInteger, MapInfoView)
|
|||
|
||||
self.forceRoutingStateChange = ForceRoutingStateChangeNone;
|
||||
self.userTouchesAction = UserTouchesActionNone;
|
||||
self.menuRestoreState = MWMSideMenuStateInactive;
|
||||
|
||||
// restore previous screen position
|
||||
if (!f.LoadState())
|
||||
|
|
Loading…
Add table
Reference in a new issue