| 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 25a4d97419857a9596cf1e5679b6fef0f1dc162d..fc6137156993d22a183cf6da93908d76f00d19f6 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
|
| @@ -66,7 +66,25 @@ const NSTimeInterval kAnimationDuration = 0.35;
|
| [self.collectionView deleteItemsAtIndexPaths:@[ indexPath ]];
|
| }
|
| completion:^(BOOL) {
|
| - // The context menu could be displayed for the delete entry.
|
| + // The context menu could be displayed for the deleted entry.
|
| + [self.suggestionCommandHandler dismissContextMenu];
|
| + }];
|
| +}
|
| +
|
| +- (void)dismissSection:(NSInteger)section {
|
| + if (section >= [self numberOfSectionsInCollectionView:self.collectionView]) {
|
| + return;
|
| + }
|
| +
|
| + NSInteger sectionIdentifier =
|
| + [self.collectionViewModel sectionIdentifierForSection:section];
|
| +
|
| + [self.collectionView performBatchUpdates:^{
|
| + [self.collectionViewModel removeSectionWithIdentifier:sectionIdentifier];
|
| + [self.collectionView deleteSections:[NSIndexSet indexSetWithIndex:section]];
|
| + }
|
| + completion:^(BOOL) {
|
| + // The context menu could be displayed for the deleted entries.
|
| [self.suggestionCommandHandler dismissContextMenu];
|
| }];
|
| }
|
|
|