Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit d56f0b1

Browse files
committed
Merge pull request #1060 from Adlai-Holler/FixRangeControllerUpdateIssue
Resolve Internal Inconsistency During Updates When Using Stable Range Controller
2 parents 516e1f1 + a19ba58 commit d56f0b1

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

AsyncDisplayKit/Details/ASRangeController.mm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@ - (void)_updateVisibleNodeIndexPaths
156156
NSSet *indexPaths = [_layoutController indexPathsForScrolling:_scrollDirection rangeType:rangeType];
157157

158158
// Notify to remove indexpaths that are leftover that are not visible or included in the _layoutController calculated paths
159-
// This value may be nil for the first call of this method.
160-
NSMutableSet *removedIndexPaths = [_rangeTypeIndexPaths[rangeKey] mutableCopy];
159+
NSMutableSet *removedIndexPaths = _rangeIsValid ? [_rangeTypeIndexPaths[rangeKey] mutableCopy] : [NSMutableSet set];
161160
[removedIndexPaths minusSet:indexPaths];
162161
[removedIndexPaths minusSet:visibleNodePathsSet];
163162

0 commit comments

Comments
 (0)