From 0af55c73067a89cc443a6bda58664fb640f98fb1 Mon Sep 17 00:00:00 2001 From: David Martinez <47610359+dvdmrtnz@users.noreply.github.com> Date: Tue, 21 Nov 2023 19:33:57 +0100 Subject: [PATCH] [search][core] Add Paid/Free indicator to search results Signed-off-by: David Martinez <47610359+dvdmrtnz@users.noreply.github.com> --- search/intermediate_result.cpp | 2 ++ search/result.hpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/search/intermediate_result.cpp b/search/intermediate_result.cpp index 72d535c561..6e84133e64 100644 --- a/search/intermediate_result.cpp +++ b/search/intermediate_result.cpp @@ -292,6 +292,8 @@ void FillDetails(FeatureType & ft, Result::Details & details) auto const roadShields = ftypes::GetRoadShieldsNames(ft); details.m_roadShields = strings::JoinStrings(roadShields, osm::MapObject::kFieldsSeparator); + details.m_fee = feature::GetLocalizedFeeType(feature::TypesHolder(ft)); + details.m_isInitialized = true; } diff --git a/search/result.hpp b/search/result.hpp index a4b6046dd4..bf6c71b3dd 100644 --- a/search/result.hpp +++ b/search/result.hpp @@ -66,6 +66,8 @@ public: uint16_t m_minutesUntilOpen = 0; uint16_t m_minutesUntilClosed = 0; + + std::string m_fee; bool m_isInitialized = false; }; @@ -93,6 +95,7 @@ public: std::string const & GetAirportIata() const { return m_details.m_airportIata; } std::string const & GetBrand() const { return m_details.m_brand; } std::string const & GetRoadShields() const { return m_details.m_roadShields; } + std::string const & GetFee() const { return m_details.m_fee; } bool IsHotel() const { return m_details.m_isHotel; } osm::YesNoUnknown IsOpenNow() const { return m_details.m_isOpenNow; }