[ios] Code cleanup.

This commit is contained in:
Ilya Grechuhin 2016-02-26 14:45:31 +03:00 committed by Sergey Yershov
parent c1897c78b4
commit 319f39e9c2
2 changed files with 3 additions and 5 deletions

View file

@ -52,12 +52,12 @@ using namespace storage;
{
m_parentId = countryId;
_isParentRoot = (m_parentId == GetFramework().Storage().GetRootId());
[self loadData];
[self load];
}
return self;
}
- (void)loadData
- (void)load
{
auto const & s = GetFramework().Storage();
TCountriesVec downloadedChildren;
@ -75,7 +75,7 @@ using namespace storage;
BOOL const hadDownloadedCountries = self.haveDownloadedCountries;
// Load updated data.
[self loadData];
[self load];
// Compare new data vs old data to understand what kind of reload is required and what sections need reload.
self.needFullReload = (hadDownloadedCountries != self.haveDownloadedCountries || countryIds.count == 0);

View file

@ -92,8 +92,6 @@ using namespace storage;
- (void)processCountryEvent:(TCountryId const &)countryId
{
storage::NodeAttrs nodeAttrs;
GetFramework().Storage().GetNodeAttrs(countryId, nodeAttrs);
MWMMapDownloaderDefaultDataSource * dataSource = self.defaultDataSource;
[dataSource reload];
if (![self.dataSource isEqual:dataSource])