forked from organicmaps/organicmaps
[ios] Added parent downloader controllers notification.
This commit is contained in:
parent
6690e64305
commit
c8b0cb88ee
1 changed files with 12 additions and 0 deletions
|
@ -106,6 +106,16 @@ using namespace storage;
|
|||
{
|
||||
if (self.skipCountryEventProcessing)
|
||||
return;
|
||||
auto notifyParentController = ^
|
||||
{
|
||||
NSArray * viewControllers = [self.navigationController viewControllers];
|
||||
NSInteger const selfIndex = [viewControllers indexOfObject:self];
|
||||
if (selfIndex < 1)
|
||||
return;
|
||||
MWMViewController * parentVC = viewControllers[selfIndex - 1];
|
||||
if ([parentVC isKindOfClass:[MWMBaseMapDownloaderViewController class]])
|
||||
[static_cast<MWMBaseMapDownloaderViewController *>(parentVC) processCountryEvent:countryId];
|
||||
};
|
||||
auto process = ^
|
||||
{
|
||||
[self configAllMapsView];
|
||||
|
@ -128,6 +138,8 @@ using namespace storage;
|
|||
for (auto & section : sections)
|
||||
[indexSet addIndex:section];
|
||||
[tv reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];
|
||||
|
||||
notifyParentController();
|
||||
};
|
||||
|
||||
if (countryId == self.parentCountryId)
|
||||
|
|
Loading…
Add table
Reference in a new issue