diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2019-05-27 10:40:30 +0300 |
---|---|---|
committer | Aleksandr Zatsepin <alexzatsepin@users.noreply.github.com> | 2019-06-10 17:42:25 +0300 |
commit | d5914cbce6a5abfa9795e3780f38a8c8e1ccef92 (patch) | |
tree | 10c817dbd7734f6b8c3c3748cd661a15dbcf470f /map | |
parent | c0719b452d727560ca2fefc4bcfbd461f8856d4a (diff) |
[partners] Fixed local ads stats for hidden campaigns
Diffstat (limited to 'map')
-rw-r--r-- | map/framework.cpp | 7 | ||||
-rw-r--r-- | map/place_page_info.hpp | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/map/framework.cpp b/map/framework.cpp index 6f0480f733..d48b3eaffb 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -985,9 +985,10 @@ void Framework::FillInfoFromFeatureType(FeatureType & ft, place_page::Info & inf if (m_localAdsManager.IsSupportedType(info.GetTypes())) { info.SetLocalAdsUrl(m_localAdsManager.GetCompanyUrl(ft.GetID())); - auto const status = m_localAdsManager.HasVisualization(ft.GetID()) - ? place_page::LocalAdsStatus::Customer - : place_page::LocalAdsStatus::Candidate; + auto status = m_localAdsManager.HasAds(ft.GetID()) ? place_page::LocalAdsStatus::Customer + : place_page::LocalAdsStatus::Candidate; + if (status == place_page::LocalAdsStatus::Customer && !m_localAdsManager.HasVisualization(ft.GetID())) + status = place_page::LocalAdsStatus::Hidden; info.SetLocalAdsStatus(status); } else diff --git a/map/place_page_info.hpp b/map/place_page_info.hpp index b93b4d4097..4998b9f477 100644 --- a/map/place_page_info.hpp +++ b/map/place_page_info.hpp @@ -53,7 +53,8 @@ enum class LocalAdsStatus { NotAvailable, Candidate, - Customer + Customer, + Hidden }; enum class LocalsStatus |