[ios] Fixed search from downloader with no downloaded maps.

This commit is contained in:
Ilya Grechuhin 2016-04-25 15:59:28 +03:00
parent b298e37b31
commit efe9fa1c92
2 changed files with 12 additions and 1 deletions

View file

@ -263,6 +263,8 @@ using namespace mwm;
- (void)configAllMapsView
{
if (self.dataSource != self.defaultDataSource)
return;
auto const & s = GetFramework().Storage();
TCountryId const parentCountryId = self.parentCountryId.UTF8String;
if (self.mode == DownloaderMode::Downloaded)

View file

@ -91,7 +91,8 @@ using namespace storage;
auto const & s = GetFramework().Storage();
if (![self.parentCountryId isEqualToString:@(s.GetRootId().c_str())])
return;
if (self.mode == mwm::DownloaderMode::Available || s.HaveDownloadedCountries())
if (self.mode == mwm::DownloaderMode::Available || s.HaveDownloadedCountries() ||
self.dataSource == self.searchDataSource)
{
[self configAllMapsView];
self.tableView.hidden = NO;
@ -210,4 +211,12 @@ using namespace storage;
mode:mode];
}
#pragma mark - Helpers
- (void)reloadTable
{
[super reloadTable];
[self checkAndConfigNoMapsView];
}
@end