forked from organicmaps/organicmaps
[cherry] [MAPSME-4571] [ios] Added adForbidden for search.
This commit is contained in:
parent
61d854f760
commit
d338b19770
1 changed files with 2 additions and 3 deletions
|
@ -304,15 +304,14 @@ using TObservers = NSHashTable<__kindof TObserver>;
|
|||
auto const resultsCount = self->m_everywhereResults.GetCount();
|
||||
auto const itemsIndex = [[MWMSearchIndex alloc] initWithSuggestionsCount:self.suggestionsCount
|
||||
resultsCount:resultsCount];
|
||||
auto bannersCache = [MWMBannersCache cache];
|
||||
if (resultsCount > 0)
|
||||
{
|
||||
auto const & adsEngine = GetFramework().GetAdsEngine();
|
||||
if (adsEngine.HasSearchBanner())
|
||||
if (![MWMSettings adForbidden] && adsEngine.HasSearchBanner())
|
||||
{
|
||||
self.banners = [[MWMSearchBanners alloc] initWithSearchIndex:itemsIndex];
|
||||
__weak auto weakSelf = self;
|
||||
[bannersCache
|
||||
[[MWMBannersCache cache]
|
||||
getWithCoreBanners:banner_helpers::MatchPriorityBanners(adsEngine.GetSearchBanners())
|
||||
cacheOnly:YES
|
||||
loadNew:reloadBanner
|
||||
|
|
Loading…
Add table
Reference in a new issue