Index: ios/chrome/browser/ui/bookmarks/bookmark_folder_collection_view.mm |
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_folder_collection_view.mm b/ios/chrome/browser/ui/bookmarks/bookmark_folder_collection_view.mm |
index 914292f67bf771bc6c28cc50d36f1b0d7eb7955f..a8e00d46973c264d286debd7dfee84d5d4c42635 100644 |
--- a/ios/chrome/browser/ui/bookmarks/bookmark_folder_collection_view.mm |
+++ b/ios/chrome/browser/ui/bookmarks/bookmark_folder_collection_view.mm |
@@ -545,11 +545,6 @@ CGSize PreferredCellSizeForWidth(UICollectionViewCell* cell, CGFloat width) { |
configurator:(SigninPromoViewConfigurator*) |
configurator { |
DCHECK(_signinPromoViewMediator); |
- if (newIdentity) { |
- NSIndexSet* indexSet = [NSIndexSet indexSetWithIndex:self.promoSection]; |
- [self.collectionView reloadSections:indexSet]; |
- return; |
- } |
NSIndexPath* indexPath = |
[NSIndexPath indexPathForRow:0 inSection:self.promoSection]; |
BookmarkSigninPromoCell* signinPromoCell = |
@@ -557,7 +552,15 @@ CGSize PreferredCellSizeForWidth(UICollectionViewCell* cell, CGFloat width) { |
[self.collectionView cellForItemAtIndexPath:indexPath]); |
if (!signinPromoCell) |
return; |
+ // Should always reconfigure the cell size even if it has to be reloaded. |
+ // -[BookmarkFolderCollectionView cellSizeForIndexPath:] uses the current |
lpromero
2017/05/23 09:27:18
The electrical current? The river's current? :)
jlebel
2017/05/23 12:24:07
All currents!
|
+ // to compute its height. |
[configurator configureSigninPromoView:signinPromoCell.signinPromoView]; |
+ if (newIdentity) { |
+ // The section should be reload to update the cell height. |
+ NSIndexSet* indexSet = [NSIndexSet indexSetWithIndex:self.promoSection]; |
+ [self.collectionView reloadSections:indexSet]; |
+ } |
} |
@end |