From 0d031b8266fae9df3260c0939e9b93f1c18d441b Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Mon, 11 Apr 2016 12:54:28 +0300 Subject: [PATCH] [ios] Removed redundant table reloads. --- .../MapDownloader/Cells/MWMMapDownloaderTableViewCell.mm | 2 +- .../DataSources/MWMMapDownloaderExtendedDataSource.mm | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/iphone/Maps/Classes/MapDownloader/Cells/MWMMapDownloaderTableViewCell.mm b/iphone/Maps/Classes/MapDownloader/Cells/MWMMapDownloaderTableViewCell.mm index eca21af4c5..f3d5813f30 100644 --- a/iphone/Maps/Classes/MapDownloader/Cells/MWMMapDownloaderTableViewCell.mm +++ b/iphone/Maps/Classes/MapDownloader/Cells/MWMMapDownloaderTableViewCell.mm @@ -81,7 +81,7 @@ namespace self.downloadSize.text = formattedSize(haveDownloadingCountries ? nodeAttrs.m_downloadingMwmSize : nodeAttrs.m_mwmSize); } -- (void)configProgress:(const storage::NodeAttrs &)nodeAttrs +- (void)configProgress:(storage::NodeAttrs const &)nodeAttrs { MWMCircularProgress * progress = self.progress; switch (nodeAttrs.m_status) diff --git a/iphone/Maps/Classes/MapDownloader/DataSources/MWMMapDownloaderExtendedDataSource.mm b/iphone/Maps/Classes/MapDownloader/DataSources/MWMMapDownloaderExtendedDataSource.mm index 84fe3208e9..d9693aa68e 100644 --- a/iphone/Maps/Classes/MapDownloader/DataSources/MWMMapDownloaderExtendedDataSource.mm +++ b/iphone/Maps/Classes/MapDownloader/DataSources/MWMMapDownloaderExtendedDataSource.mm @@ -41,7 +41,8 @@ using namespace storage; [super reload]; NSInteger const closestCoutriesCountAfterUpdate = self.nearmeCountries.count; - if (closestCoutriesCountBeforeUpdate == 0 || closestCoutriesCountAfterUpdate == 0) + if (closestCoutriesCountBeforeUpdate != closestCoutriesCountAfterUpdate && + (closestCoutriesCountBeforeUpdate == 0 || closestCoutriesCountAfterUpdate == 0)) self.needFullReload = YES; if (self.needFullReload) return;