[ASCollectionView] Move the variable in

This commit is contained in:
Adlai Holler
2016-07-20 13:06:00 -07:00
parent 6a13c0365b
commit 3ebddb6837

View File

@@ -1080,7 +1080,6 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell";
- (void)rangeController:(ASRangeController *)rangeController didEndUpdatesAnimated:(BOOL)animated completion:(void (^)(BOOL))completion
{
ASDisplayNodeAssertMainThread();
NSUInteger numberOfUpdateBlocks = _batchUpdateBlocks.count;
if (!self.asyncDataSource || _superIsPendingDataLoad) {
if (completion) {
completion(NO);
@@ -1090,6 +1089,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell";
}
ASPerformBlockWithoutAnimation(!animated, ^{
NSUInteger numberOfUpdateBlocks = _batchUpdateBlocks.count;
[_layoutFacilitator collectionViewWillPerformBatchUpdates];
[self _superPerformBatchUpdates:^{
for (dispatch_block_t block in _batchUpdateBlocks) {