Skip to content

Commit

Permalink
[iOS] Fixed duplicate banner creation in downloader screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Polas committed Dec 18, 2020
1 parent b9c04ba commit 30044eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion iphone/Maps/Classes/Widgets/MWMMapDownloadDialog.mm
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ - (void)layoutSubviews {
}

- (void)configDialog {
[self removePreviousBunnerIfNeeded];
auto &f = GetFramework();
auto const &s = f.GetStorage();
auto const &p = f.GetDownloadingPolicy();
Expand All @@ -126,6 +125,7 @@ - (void)configDialog {
switch (nodeAttrs.m_status) {
case NodeStatus::NotDownloaded:
case NodeStatus::Partly: {
[self removePreviousBunnerIfNeeded];
MapViewController *controller = self.controller;
BOOL const isMapVisible = [controller.navigationController.topViewController isEqual:controller];
if (isMapVisible && !self.isAutoDownloadCancelled && canAutoDownload(m_countryId)) {
Expand Down Expand Up @@ -163,6 +163,7 @@ - (void)configDialog {
case NodeStatus::Undefined:
case NodeStatus::Error:
if (p.IsAutoRetryDownloadFailed()) {
[self removePreviousBunnerIfNeeded];
[self showError:nodeAttrs.m_error];
} else {
[self showInQueue];
Expand Down

0 comments on commit 30044eb

Please sign in to comment.