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

Unified Diff: ios/chrome/browser/ui/history/history_collection_view_controller.mm

Issue 2761263003: Allow CollectionViewModel/Controller queries without SectionIdentifier (Closed)
Patch Set: Cleanup Created 3 years, 8 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/history/history_collection_view_controller.mm
diff --git a/ios/chrome/browser/ui/history/history_collection_view_controller.mm b/ios/chrome/browser/ui/history/history_collection_view_controller.mm
index 0d7737b4cb017d5aba6f0a27f68f9359b830a609..1e12334e5717c8593437172fcef299cc7240b948 100644
--- a/ios/chrome/browser/ui/history/history_collection_view_controller.mm
+++ b/ios/chrome/browser/ui/history/history_collection_view_controller.mm
@@ -285,9 +285,7 @@ const CGFloat kSeparatorInset = 10;
hasSectionForSectionIdentifier:sectionIdentifier] &&
[self.collectionViewModel hasItem:item
inSectionWithIdentifier:sectionIdentifier]) {
- NSIndexPath* indexPath =
- [self.collectionViewModel indexPathForItem:item
- inSectionWithIdentifier:sectionIdentifier];
+ NSIndexPath* indexPath = [self.collectionViewModel indexPathForItem:item];
[self.collectionView
selectItemAtIndexPath:indexPath
animated:NO
@@ -317,10 +315,7 @@ const CGFloat kSeparatorInset = 10;
hasSectionForSectionIdentifier:sectionIdentifier] &&
[self.collectionViewModel hasItem:item
inSectionWithIdentifier:sectionIdentifier]) {
- [self
- reconfigureCellsForItems:@[ item ]
- inSectionWithIdentifier:
- [self.entryInserter sectionIdentifierForTimestamp:item.timestamp]];
+ [self reconfigureCellsForItems:@[ item ]];
}
}
@@ -673,8 +668,7 @@ const CGFloat kSeparatorInset = 10;
base::mac::ObjCCastStrict<HistoryEntryItem>(item);
if (![entries containsObject:historyItem]) {
NSIndexPath* indexPath =
- [self.collectionViewModel indexPathForItem:historyItem
- inSectionWithIdentifier:sectionIdentifier];
+ [self.collectionViewModel indexPathForItem:historyItem];
[self.collectionView
selectItemAtIndexPath:indexPath
animated:NO

Powered by Google App Engine
This is Rietveld 408576698