[iOS] fix PP gallery header

https://jira.mail.ru/browse/MAPSME-11977
This commit is contained in:
Aleksey Belouosv 2019-09-27 18:14:43 +03:00 committed by Aleksey Belousov
parent 4ef2caf062
commit 6c9838e517
5 changed files with 10 additions and 4 deletions

View file

@ -8,6 +8,7 @@ NS_ASSUME_NONNULL_BEGIN
- (promo::CityGallery::Item const &)galleryItemAtIndex:(NSUInteger)index;
- (NSUInteger)count;
- (nullable NSURL *)moreURL;
- (NSString *)tagString;
@end

View file

@ -32,4 +32,8 @@
return nil;
}
- (NSString *)tagString {
return @(m_results.m_category.c_str());
}
@end

View file

@ -228,7 +228,7 @@ using namespace discovery;
MWMDiscoveryGuideCollectionHolderCell *cell = (MWMDiscoveryGuideCollectionHolderCell *)
[self.tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath];
MWMDiscoveryCollectionView *collection = (MWMDiscoveryCollectionView *)cell.collectionView;
[cell config];
[cell config:L(@"gallery_pp_download_guides_title")];
collection.delegate = self;
collection.dataSource = self;
collection.itemType = ItemType::Promo;

View file

@ -31,8 +31,8 @@ final class DiscoveryBookingCollectionHolderCell: DiscoveryCollectionHolder {
@objc(MWMDiscoveryGuideCollectionHolderCell)
final class DiscoveryGuideCollectionHolderCell: DiscoveryCollectionHolder {
@objc func config() {
header.text = L("gallery_pp_download_guides_title").uppercased()
@objc func config(_ title: String) {
header.text = title.uppercased()
collectionView.register(cellClass: DiscoveryGuideCell.self)
collectionView.register(cellClass: DiscoveryMoreCell.self)
}

View file

@ -658,7 +658,8 @@ std::map<MetainfoRows, Class> const kMetaInfoCells = {
MWMDiscoveryGuideCollectionHolderCell *cell = (MWMDiscoveryGuideCollectionHolderCell *)
[tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath];
MWMDiscoveryCollectionView *collection = (MWMDiscoveryCollectionView *)cell.collectionView;
[cell config];
[cell config:[NSString stringWithCoreFormat:L(@"pp_discovery_place_related_tag_header")
arguments:@[self.data.promoGallery.tagString]]];
collection.delegate = self;
collection.dataSource = self;
collection.itemType = discovery::ItemType::Promo;