diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2019-05-23 18:43:15 +0300 |
---|---|---|
committer | Tatiana Yan <tatiana.kondakova@gmail.com> | 2019-05-23 19:23:13 +0300 |
commit | b2143a0bb85dee92859799fb11aa4193339fc891 (patch) | |
tree | cd5c9b6a96fa1c0c5533e3f525ad2901e6ac11e1 /iphone | |
parent | 858b73e5169ecf83bdea8f03ef924a4105c7f690 (diff) |
[promo_api][android][ios] build fix
Diffstat (limited to 'iphone')
-rw-r--r-- | iphone/Maps/UI/Discovery/DiscoveryControllerViewModel.hpp | 2 | ||||
-rw-r--r-- | iphone/Maps/UI/Discovery/MWMDiscoveryController.mm | 12 | ||||
-rw-r--r-- | iphone/Maps/UI/Discovery/MWMDiscoveryTableManager.mm | 13 |
3 files changed, 25 insertions, 2 deletions
diff --git a/iphone/Maps/UI/Discovery/DiscoveryControllerViewModel.hpp b/iphone/Maps/UI/Discovery/DiscoveryControllerViewModel.hpp index cb9797b1c7..fe83be1e16 100644 --- a/iphone/Maps/UI/Discovery/DiscoveryControllerViewModel.hpp +++ b/iphone/Maps/UI/Discovery/DiscoveryControllerViewModel.hpp @@ -47,6 +47,8 @@ public: case ItemType::Cafes: return m_cafes.m_results.GetCount(); case ItemType::Hotels: return m_hotels.m_results.GetCount(); case ItemType::LocalExperts: return m_experts.size(); + // TODO: Add correct value here. + case ItemType::Promo: return 0; } } diff --git a/iphone/Maps/UI/Discovery/MWMDiscoveryController.mm b/iphone/Maps/UI/Discovery/MWMDiscoveryController.mm index d77371d5e3..8e9e3ea3b9 100644 --- a/iphone/Maps/UI/Discovery/MWMDiscoveryController.mm +++ b/iphone/Maps/UI/Discovery/MWMDiscoveryController.mm @@ -16,10 +16,11 @@ #include "map/discovery/discovery_client_params.hpp" #include "map/search_product_info.hpp" -#include "partners_api/locals_api.hpp" - #include "search/result.hpp" +#include "partners_api/locals_api.hpp" +#include "partners_api/promo_api.hpp" + #include "platform/localization.hpp" #include "platform/platform.hpp" @@ -56,6 +57,11 @@ struct Callback m_setLocalExperts(experts); m_refreshSection(ItemType::LocalExperts); } + + void operator()(uint32_t const requestId, promo::CityGallery const & experts) const + { + // TODO: Please add correct implementation here. + } using SetSearchResults = function<void(search::Results const & res, vector<search::ProductInfo> const & productInfo, @@ -264,6 +270,8 @@ struct Callback case ItemType::LocalExperts: CHECK(false, ("Attempt to route to item with type:", static_cast<int>(type))); break; + // TODO: Add correct code here. + case ItemType::Promo: break; } MWMRoutePoint * pt = [[MWMRoutePoint alloc] initWithPoint:point diff --git a/iphone/Maps/UI/Discovery/MWMDiscoveryTableManager.mm b/iphone/Maps/UI/Discovery/MWMDiscoveryTableManager.mm index 7a8affb911..271daa4268 100644 --- a/iphone/Maps/UI/Discovery/MWMDiscoveryTableManager.mm +++ b/iphone/Maps/UI/Discovery/MWMDiscoveryTableManager.mm @@ -38,6 +38,8 @@ NSString * StatProvider(ItemType const type) case ItemType::Attractions: return kStatSearchAttractions; case ItemType::Cafes: return kStatSearchRestaurants; case ItemType::Hotels: return kStatBooking; + // TODO: Add correct stat key here. + case ItemType::Promo: return @""; } } @@ -302,6 +304,8 @@ string GetDistance(m2::PointD const & from, m2::PointD const & to) return [self searchCollectionHolderCell:indexPath]; } case ItemType::Hotels: return [self bookingCollectionHolderCell:indexPath]; + // TODO: Add correct value here. + case ItemType::Promo: return 0; } } @@ -445,6 +449,15 @@ string GetDistance(m2::PointD const & from, m2::PointD const & to) }]; return cell; } + case ItemType::Promo: + { + // TODO: Add correct implementation here. + auto cls = [MWMDiscoveryMoreCell class]; + auto cell = static_cast<MWMDiscoveryMoreCell *>([collectionView + dequeueReusableCellWithCellClass:cls + indexPath:indexPath]); + return cell; + } } } |