diff --git a/iphone/Maps/CountryTreeVC.mm b/iphone/Maps/CountryTreeVC.mm index b24dafb8dd..5ee6114cec 100644 --- a/iphone/Maps/CountryTreeVC.mm +++ b/iphone/Maps/CountryTreeVC.mm @@ -30,6 +30,14 @@ extern NSString * const MapsStatusChangedNotification; ASSERT(position < self.tree.GetChildCount(), ()); self.title = @(self.tree.GetChildName(position).c_str()); self.tree.SetChildAsRoot(position); + if (self.tree.IsDownloadAllAvailable()) + { + self.navigationItem.rightBarButtonItem = + [[UIBarButtonItem alloc] initWithTitle:L(@"download_all") + style:UIBarButtonItemStylePlain + target:self + action:@selector(onDownloadAll)]; + } } __weak CountryTreeVC * weakSelf = self; @@ -69,6 +77,11 @@ extern NSString * const MapsStatusChangedNotification; } } +- (void)onDownloadAll +{ + self.tree.DownloadAll(); +} + #define TOP_ROWS_COUNT 1 - (NSIndexPath *)downloadedCountriesIndexPath