Commit ee73c1cd authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Remove NTP animation on -reloadSection.

Bug: 869392
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Id49d6eb03cecf76d8ed7ec476f300b6b4cb5de23
Reviewed-on: https://chromium-review.googlesource.com/1180550Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584647}
parent 442ac471
......@@ -331,12 +331,6 @@ NSString* const kContentSuggestionsCollectionUpdaterSnackbarCategory =
NSInteger section = [model sectionForSectionIdentifier:sectionIdentifier];
NSMutableArray* oldItems = [NSMutableArray array];
NSInteger numberOfItems = [model numberOfItemsInSection:section];
for (NSInteger i = 0; i < numberOfItems; i++) {
[oldItems addObject:[NSIndexPath indexPathForItem:i inSection:section]];
}
// Reset collection model data for |sectionIdentifier|
[self.collectionViewController.collectionViewModel
setFooter:nil
......@@ -364,9 +358,12 @@ NSString* const kContentSuggestionsCollectionUpdaterSnackbarCategory =
[self.collectionViewController.collectionView
insertItemsAtIndexPaths:addedItems];
};
[UIView animateWithDuration:0
animations:^{
[self.collectionViewController.collectionView
performBatchUpdates:addSectionBlock
completion:nil];
}];
// Make sure we get the right index for the section.
section = [model sectionForSectionIdentifier:sectionIdentifier];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment