[iOS] Fixed downloading banner show/hide behavior

This commit is contained in:
Zoia Pribytkova 2019-08-09 11:51:07 +03:00 committed by Aleksey Belousov
parent 80f198b32d
commit f4d00eefa2

View file

@ -101,6 +101,7 @@ using namespace storage;
}
- (void)configDialog {
[self removePreviousBunnerIfNeeded];
auto &f = GetFramework();
auto const &s = f.GetStorage();
auto const &p = f.GetDownloadingPolicy();
@ -347,6 +348,18 @@ using namespace storage;
}];
}
- (void)removePreviousBunnerIfNeeded {
if (!self.bannerViewController) {
return;
}
self.bannerVisibleConstraintV.priority = UILayoutPriorityDefaultLow;
self.bannerVisibleConstraintH.priority = UILayoutPriorityDefaultLow;
[self.bannerViewController.view removeFromSuperview];
self.bannerViewController = nil;
self.bannerView.hidden = YES;
[self layoutIfNeeded];
}
#pragma mark - MWMFrameworkStorageObserver
- (void)processCountryEvent:(CountryId const &)countryId {