From b09956346515987c204809266ba5f849a4c155bb Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Tue, 22 Mar 2016 15:10:56 +0300 Subject: [PATCH] [ios] Fixed downloader crash on search. --- .../MapDownloader/MWMBaseMapDownloaderViewController.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iphone/Maps/Classes/MapDownloader/MWMBaseMapDownloaderViewController.mm b/iphone/Maps/Classes/MapDownloader/MWMBaseMapDownloaderViewController.mm index ea9702e375..4e2d66f69f 100644 --- a/iphone/Maps/Classes/MapDownloader/MWMBaseMapDownloaderViewController.mm +++ b/iphone/Maps/Classes/MapDownloader/MWMBaseMapDownloaderViewController.mm @@ -56,6 +56,7 @@ NSString * const kUpdateActionTitle = L(@"downloader_status_outdated"); @property (nonatomic) NSMutableDictionary * cellHeightCache; @property (nonatomic) BOOL skipCountryEventProcessing; +@property (nonatomic) BOOL forceFullReload; @end @@ -617,6 +618,7 @@ using namespace storage; - (void)setDataSource:(MWMMapDownloaderDataSource *)dataSource { self.tableView.dataSource = dataSource; + self.forceFullReload = YES; } - (MWMMapDownloaderDataSource *)dataSource @@ -640,8 +642,9 @@ using namespace storage; MWMMapDownloaderDataSource * dataSource = self.dataSource; UITableView * tableView = self.tableView; - if (dataSource.needFullReload) + if (self.forceFullReload || dataSource.needFullReload) { + self.forceFullReload = NO; // If these methods are not called, tableView will not call tableView:cellForRowAtIndexPath: [tableView setNeedsLayout]; [tableView layoutIfNeeded];