| Index: ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm
|
| diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm
|
| index 11a58eb11d050b92f77f558c237f986c27a4a4c0..23298c0c99e6e6ec18cda03dad3fb639fecfb5a9 100644
|
| --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm
|
| +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm
|
| @@ -248,16 +248,25 @@ using CSCollectionViewItem = CollectionViewItem<SuggestedContent>;
|
| CollectionViewItem* touchedItem =
|
| [self.collectionViewModel itemAtIndexPath:touchedItemIndexPath];
|
|
|
| - if ([self.collectionUpdater contentSuggestionTypeForItem:touchedItem] !=
|
| - ContentSuggestionTypeArticle) {
|
| - // Only trigger context menu on articles.
|
| - return;
|
| + ContentSuggestionType type =
|
| + [self.collectionUpdater contentSuggestionTypeForItem:touchedItem];
|
| + switch (type) {
|
| + case ContentSuggestionTypeArticle:
|
| + [self.suggestionCommandHandler
|
| + displayContextMenuForArticle:touchedItem
|
| + atPoint:touchLocation
|
| + atIndexPath:touchedItemIndexPath];
|
| + break;
|
| + case ContentSuggestionTypeMostVisited:
|
| + [self.suggestionCommandHandler
|
| + displayContextMenuForMostVisitedItem:touchedItem
|
| + atPoint:touchLocation
|
| + atIndexPath:touchedItemIndexPath];
|
| + break;
|
| + default:
|
| + break;
|
| }
|
|
|
| - [self.suggestionCommandHandler
|
| - displayContextMenuForArticle:touchedItem
|
| - atPoint:touchLocation
|
| - atIndexPath:touchedItemIndexPath];
|
| }
|
|
|
| // Checks if the |section| is empty and add an empty element if it is the case.
|
|
|