Fixed search banners representation.
This commit is contained in:
parent
979227135f
commit
c4c749180d
3 changed files with 7 additions and 1 deletions
|
@ -2,5 +2,6 @@ typedef NS_ENUM(NSUInteger, MWMSearchItemType) {
|
|||
// Order == priority.
|
||||
MWMSearchItemTypeRegular,
|
||||
MWMSearchItemTypeMopub,
|
||||
MWMSearchItemTypeFacebook,
|
||||
MWMSearchItemTypeSuggestion
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
|
Reference in a new issue