Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(383)

Unified Diff: ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm

Issue 2887073002: Layout Most Visited for ContentSuggestions (Closed)
Patch Set: Make single-line if cohenrent Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 01c28a7a1770d302d471817bd1821a122025f9c8..d0c0300da6389f4cae9381439ad1e24db168294c 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
@@ -342,6 +342,12 @@ addSuggestionsToModel:(NSArray<CSCollectionViewItem*>*)suggestions
return [self addItem:item toSectionWithIdentifier:sectionIdentifier];
}
+- (BOOL)isMostVisitedSection:(NSInteger)section {
+ return
+ [self.collectionViewController.collectionViewModel
+ sectionIdentifierForSection:section] == SectionIdentifierMostVisited;
+}
+
#pragma mark - SuggestedContentDelegate
- (void)loadImageForSuggestedItem:(CSCollectionViewItem*)suggestedItem {

Powered by Google App Engine
This is Rietveld 408576698