mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-05-18 09:59:46 +08:00
Merge pull request #1414 from maicki/LastRangeUpdateBeforeClosing
[ASRangeController] Move call of range update completion blocks to consider early returns in _updateVisibleNodeIndexPaths
This commit is contained in:
@@ -134,6 +134,11 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self _updateVisibleNodeIndexPaths];
|
||||
|
||||
for (void (^completionBlock)(void) in _scheduledRangeUpdateCompletionBlocks) {
|
||||
completionBlock();
|
||||
}
|
||||
[_scheduledRangeUpdateCompletionBlocks removeAllObjects];
|
||||
|
||||
dataSource = nil;
|
||||
delegate = nil;
|
||||
});
|
||||
@@ -336,11 +341,6 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive;
|
||||
_rangeIsValid = YES;
|
||||
_queuedRangeUpdate = NO;
|
||||
|
||||
for (void (^completionBlock)(void) in _scheduledRangeUpdateCompletionBlocks) {
|
||||
completionBlock();
|
||||
}
|
||||
[_scheduledRangeUpdateCompletionBlocks removeAllObjects];
|
||||
|
||||
#if ASRangeControllerLoggingEnabled
|
||||
// NSSet *visibleNodePathsSet = [NSSet setWithArray:visibleNodePaths];
|
||||
// BOOL setsAreEqual = [visibleIndexPaths isEqualToSet:visibleNodePathsSet];
|
||||
|
||||
Reference in New Issue
Block a user