Fixed search banners representation.

This commit is contained in:
VladiMihaylenko 2017-05-02 14:08:23 +03:00 committed by r.kuznetsov
parent 979227135f
commit c4c749180d
3 changed files with 7 additions and 1 deletions

View file

@ -2,5 +2,6 @@ typedef NS_ENUM(NSUInteger, MWMSearchItemType) {
// Order == priority.
MWMSearchItemTypeRegular,
MWMSearchItemTypeMopub,
MWMSearchItemTypeFacebook,
MWMSearchItemTypeSuggestion
};

View file

@ -18,6 +18,9 @@ final class SearchBanners: NSObject {
case .mopub:
type = .mopub
prefferedPosition = 2
case .facebook:
type = .facebook
prefferedPosition = 2
default:
assert(false, "Unsupported banner type")
type = .regular

View file

@ -89,6 +89,7 @@
return cell;
}
case MWMSearchItemTypeMopub:
case MWMSearchItemTypeFacebook:
{
auto cell = static_cast<MWMAdBanner *>(
[tableView dequeueReusableCellWithCellClass:[MWMAdBanner class] indexPath:indexPath]);
@ -126,7 +127,8 @@
[delegate processSearchWithResult:result];
break;
}
case MWMSearchItemTypeMopub: break;
case MWMSearchItemTypeMopub:
case MWMSearchItemTypeFacebook: break;
case MWMSearchItemTypeSuggestion:
{
auto const & suggestion = [MWMSearch resultWithContainerIndex:containerIndex];