[iOS] don't show baneer on downloads screen when ads removal is active

https://jira.mail.ru/browse/MAPSME-10599
This commit is contained in:
Aleksey Belouosv 2019-09-20 15:43:47 +03:00 committed by Aleksey Belousov
parent 373c03f063
commit 7d5858e352

View file

@ -31,7 +31,9 @@ auto constexpr extraSection = MWMMapDownloaderDataSourceExtraSection::Ads;
- (void)configAdsSection
{
[self removeExtraSection:extraSection];
if ([UIColor isNightMode] || !GetFramework().GetStorage().HaveDownloadedCountries())
auto & purchase = GetFramework().GetPurchase();
bool hasSubscription = purchase && purchase->IsSubscriptionActive(SubscriptionType::RemoveAds);
if ([UIColor isNightMode] || !GetFramework().GetStorage().HaveDownloadedCountries() || hasSubscription)
return;
if ([MWMMyTarget manager].bannersCount != 0)
[self addExtraSection:extraSection];