From fb42e62573415b8fa032dfbd4a50d7093e109763 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Mon, 29 Feb 2016 12:01:53 +0300 Subject: [PATCH] [ios] Review fixes. --- .../MapViewControls/Search/MWMSearchManager.mm | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/MWMSearchManager.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/MWMSearchManager.mm index eceaa22476..dace846865 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/MWMSearchManager.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/MWMSearchManager.mm @@ -37,8 +37,6 @@ extern NSString * const kSearchStateKey = @"SearchStateKey"; @property (nonatomic) MWMSearchTableViewController * tableViewController; @property (nonatomic) MWMSearchDownloadViewController * downloadController; -@property (nonatomic) BOOL haveDownloadedMaps; - @end @implementation MWMSearchManager @@ -265,11 +263,6 @@ extern NSString * const kSearchStateKey = @"SearchStateKey"; - (void)changeToDefaultState { - using namespace storage; - auto const & s = GetFramework().Storage(); - TCountriesVec downloadedCountries, availCountries; - s.GetChildrenInGroups(s.GetRootId(), downloadedCountries, availCountries); - self.haveDownloadedMaps = !downloadedCountries.empty(); self.view.alpha = 1.; [self updateTopController]; [self.navigationController popToRootViewControllerAnimated:NO]; @@ -317,7 +310,7 @@ extern NSString * const kSearchStateKey = @"SearchStateKey"; - (UIViewController *)topController { - if (self.haveDownloadedMaps || self.state == MWMSearchManagerStateHidden) + if (self.state == MWMSearchManagerStateHidden || GetFramework().Storage().HaveDownloadedCountries()) { return self.tabbedController; }