| Index: ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm
|
| diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm
|
| index 96a0e9c2b55cc987b80d8fbd6cf25f2c1fabf83f..c0f4c134adbfdf8296b77b5930e89e14a1c12ca7 100644
|
| --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm
|
| +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm
|
| @@ -153,21 +153,22 @@ SectionIdentifier SectionIdentifierForInfo(
|
| __weak ContentSuggestionsCollectionUpdater* weakSelf = self;
|
| __weak ContentSuggestionsArticleItem* weakArticle = articleItem;
|
| void (^imageFetchedCallback)(const gfx::Image&) = ^(const gfx::Image& image) {
|
| + if (image.IsEmpty()) {
|
| + return;
|
| + }
|
| +
|
| ContentSuggestionsCollectionUpdater* strongSelf = weakSelf;
|
| ContentSuggestionsArticleItem* strongArticle = weakArticle;
|
| if (!strongSelf || !strongArticle) {
|
| return;
|
| }
|
|
|
| - strongArticle.imageBeingFetched = NO;
|
| strongArticle.image = image.CopyUIImage();
|
| [strongSelf.collectionViewController
|
| reconfigureCellsForItems:@[ strongArticle ]
|
| inSectionWithIdentifier:sectionIdentifier];
|
| };
|
|
|
| - articleItem.imageBeingFetched = YES;
|
| -
|
| [self.dataSource.imageFetcher
|
| fetchImageForSuggestion:articleItem.suggestionIdentifier
|
| callback:imageFetchedCallback];
|
|
|