[new downloader][ios] Fixed migration from map on zoomin.

This commit is contained in:
Ilya Grechuhin 2016-02-20 14:49:35 +03:00 committed by Sergey Yershov
parent 364bda91c8
commit 37b434bdf8
3 changed files with 15 additions and 4 deletions

View file

@ -102,7 +102,8 @@ NSString * const kEditorSegue = @"Map2EditorSegue";
@end
@interface MapViewController ()<MTRGNativeAppwallAdDelegate, MWMFrameworkRouteBuilderObserver,
MWMFrameworkMyPositionObserver, MWMFrameworkUserMarkObserver>
MWMFrameworkMyPositionObserver, MWMFrameworkUserMarkObserver,
MWMFrameworkDrapeObserver>
@property (nonatomic, readwrite) MWMMapViewControlsManager * controlsManager;
@property (nonatomic) MWMBottomMenuState menuRestoreState;
@ -593,6 +594,16 @@ NSString * const kEditorSegue = @"Map2EditorSegue";
self.forceRoutingStateChange = ForceRoutingStateChangeNone;
}
#pragma mark - MWMFrameworkDrapeObserver
- (void)processViewportCountryEvent:(TCountryId const &)countryId
{
if (countryId != kInvalidCountryId && platform::migrate::NeedMigrate())
[self performSegueWithIdentifier:kMigrationSegue sender:self];
else
[self.downloadDialog processViewportCountryEvent:countryId];
}
#pragma mark - MWMFrameworkUserMarkObserver
- (void)processUserMarkEvent:(UserMark const *)mark

View file

@ -4,4 +4,6 @@
+ (instancetype)dialogForController:(MWMViewController *)controller;
- (void)processViewportCountryEvent:(TCountryId const &)countryId;
@end

View file

@ -15,7 +15,7 @@ extern char const * kAutoDownloadEnabledKey;
using namespace storage;
@interface MWMMapDownloadDialog ()<MWMFrameworkDrapeObserver, MWMFrameworkStorageObserver,
@interface MWMMapDownloadDialog ()<MWMFrameworkStorageObserver,
MWMCircularProgressProtocol>
@property (weak, nonatomic) IBOutlet UILabel * parentNode;
@property (weak, nonatomic) IBOutlet UILabel * node;
@ -160,8 +160,6 @@ using namespace storage;
self.progressView.state = MWMCircularProgressStateSpinner;
}
#pragma mark - MWMFrameworkDrapeObserver
- (void)processViewportCountryEvent:(TCountryId const &)countryId
{
if (m_countryId == countryId)