Index: ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm |
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm b/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm |
index 52b7c7caca1b39dc294f10938fbf5f2cdd9aeb37..9c99ee7144b28d9f980ba71e1cd9c1c673cf7db1 100644 |
--- a/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm |
+++ b/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm |
@@ -198,9 +198,17 @@ ntp_snippets::ContentSuggestion::ID SuggestionIDForSectionID( |
- (void)contentSuggestionsService: |
(ntp_snippets::ContentSuggestionsService*)suggestionsService |
- SuggestionInvalidated: |
+ suggestionInvalidated: |
(const ntp_snippets::ContentSuggestion::ID&)suggestion_id { |
- // Update dataSink. |
+ ContentSuggestionsCategoryWrapper* wrapper = |
+ [[ContentSuggestionsCategoryWrapper alloc] |
+ initWithCategory:suggestion_id.category()]; |
+ ContentSuggestionIdentifier* suggestionIdentifier = |
+ [[ContentSuggestionIdentifier alloc] init]; |
+ suggestionIdentifier.IDInSection = suggestion_id.id_within_category(); |
+ suggestionIdentifier.sectionInfo = self.sectionInformationByCategory[wrapper]; |
+ |
+ [self.dataSink clearSuggestion:suggestionIdentifier]; |
} |
- (void)contentSuggestionsServiceFullRefreshRequired: |