Cleanup the skiplayout in reloadData fallback

Summary: The test was actually deallocated last year, and this test is never cleaned up. Now let's clean it up.

Reviewed By: chritto

Differential Revision: D15777898

fbshipit-source-id: c3a704ee1bfdd085c4ceb89af424a10ed07a65b6
This commit is contained in:
Zhisheng Huang 2019-06-12 18:30:50 -07:00 committed by Facebook Github Bot
parent c7caa4f166
commit 8a0c69ba29
2 changed files with 3 additions and 7 deletions

View file

@ -24,10 +24,8 @@ typedef NS_OPTIONS (NSInteger, IGListExperiment) {
IGListExperimentDeferredToObjectCreation = 1 << 6,
/// Test getting collection view at update time.
IGListExperimentGetCollectionViewAtUpdate = 1 << 7,
/// Test skipping layout when UICollectionView isn't visible
IGListExperimentSkipLayout = 1 << 8,
/// Test invalidating layout when cell reloads/updates in IGListBindingSectionController.
IGListExperimentInvalidateLayoutForUpdates = 1 << 9,
IGListExperimentInvalidateLayoutForUpdates = 1 << 8,
};
/**

View file

@ -174,10 +174,8 @@
[self _cleanStateAfterUpdates];
[self _performBatchUpdatesItemBlockApplied];
[collectionView reloadData];
if (!IGListExperimentEnabled(self.experiments, IGListExperimentSkipLayout)
|| collectionView.window != nil) {
[collectionView layoutIfNeeded];
}
[collectionView layoutIfNeeded];
executeCompletionBlocks(YES);
};