diff --git a/map/framework.cpp b/map/framework.cpp index 156cfbc7e2..370ae5fda4 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -673,6 +673,7 @@ void Framework::FillBookmarkInfo(Bookmark const & bmk, BookmarkAndCategory const { FillPointInfo(bmk.GetPivot(), string(), info); info.m_bac = bac; + info.m_bookmarkCategoryName = GetBmCategory(bac.first)->GetName(); } void Framework::FillFeatureInfo(FeatureID const & fid, place_page::Info & info) const diff --git a/map/place_page_info.cpp b/map/place_page_info.cpp index 3297a1548b..24e10b0ec9 100644 --- a/map/place_page_info.cpp +++ b/map/place_page_info.cpp @@ -46,10 +46,18 @@ string Info::GetTitle() const string Info::GetSubtitle() const { if (!IsFeature()) + { + if (IsBookmark()) + return m_bookmarkCategoryName; return {}; + } vector values; + // Bookmark category. + if (IsBookmark()) + values.push_back(m_bookmarkCategoryName); + // Type. values.push_back(GetLocalizedType()); @@ -87,6 +95,7 @@ string Info::FormatStars() const string Info::GetCustomName() const { return m_customName; } BookmarkAndCategory Info::GetBookmarkAndCategory() const { return m_bac; } +string Info::GetBookmarkCategoryName() const { return m_bookmarkCategoryName; } string const & Info::GetApiUrl() const { return m_apiUrl; } void Info::SetMercator(m2::PointD const & mercator) { m_mercator = mercator; } } // namespace place_page diff --git a/map/place_page_info.hpp b/map/place_page_info.hpp index d1198ec916..2c50821c3d 100644 --- a/map/place_page_info.hpp +++ b/map/place_page_info.hpp @@ -50,6 +50,7 @@ public: string GetCustomName() const; BookmarkAndCategory GetBookmarkAndCategory() const; + string GetBookmarkCategoryName() const; string const & GetApiUrl() const; void SetMercator(m2::PointD const & mercator); @@ -58,6 +59,8 @@ public: string m_customName; /// If not empty, bookmark is bound to this place page. BookmarkAndCategory m_bac = MakeEmptyBookmarkAndCategory(); + /// Bookmark category name. Empty, if it's not bookmark; + string m_bookmarkCategoryName; /// Api ID passed for the selected object. It's automatically included in api url below. string m_apiId; /// [Deep] link to open when "Back" button is pressed in a Place Page.