| 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 1863075eb533f2d29c60e658e20ac9610cab71e2..3f4bb8b747f8630f5d3ceb3b12ed9298db177afb 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
|
| @@ -251,16 +251,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.
|
|
|