Fixed priority of search icons

This commit is contained in:
r.kuznetsov 2017-08-14 14:25:40 +03:00 committed by Daria Volvenkova
parent cf1290397f
commit 1b3d122497

View file

@ -1789,14 +1789,19 @@ void Framework::FillSearchResultsMarks(search::Results::ConstIter begin,
if (!r.HasPoint())
continue;
SearchMarkPoint * mark =
static_cast<SearchMarkPoint *>(guard.m_controller.CreateUserMark(r.GetFeatureCenter()));
auto mark = static_cast<SearchMarkPoint *>(guard.m_controller.CreateUserMark(r.GetFeatureCenter()));
ASSERT_EQUAL(mark->GetMarkType(), UserMark::Type::SEARCH, ());
auto const isFeature = r.GetResultType() == search::Result::RESULT_FEATURE;
if (isFeature)
mark->SetFoundFeature(r.GetFeatureID());
mark->SetMatchedName(r.GetString());
if (isFeature && m_localAdsManager.Contains(r.GetFeatureID()))
{
mark->SetCustomSymbol("search-adv");
continue;
}
// TODO: delete me after Cian project is finished.
if (m_cianSearchMode)
{
@ -1808,8 +1813,6 @@ void Framework::FillSearchResultsMarks(search::Results::ConstIter begin,
mark->SetCustomSymbol("search-booking");
else if (r.m_metadata.m_isSponsoredBank)
mark->SetCustomSymbol("search-tinkoff");
else if (isFeature && m_localAdsManager.Contains(r.GetFeatureID()))
mark->SetCustomSymbol("search-adv");
}
}