diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h index 782607fd0c..755d82004d 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h @@ -60,14 +60,6 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType); */ - (NSUInteger)newSectionForOldSection:(NSUInteger)oldSection; -/** - Get the index path after the update for the item at the given index path before the update. - - @precondition The change set must be completed. - @returns The new index path, or nil if the given item (or its section) was deleted. - */ -- (nullable NSIndexPath *)newIndexPathForOldIndexPath:(NSIndexPath *)indexPath; - @property (nonatomic, readonly) BOOL completed; /// Call this once the change set has been constructed to prevent future modifications to the changeset. Calling this more than once is a programmer error. diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m index 9075f36878..d1b54438a0 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m @@ -143,30 +143,6 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) return newIndex; } -- (nullable NSIndexPath *)newIndexPathForOldIndexPath:(NSIndexPath *)indexPath -{ - [self _ensureCompleted]; - // If section was deleted, nil - NSUInteger oldSection = indexPath.section; - NSUInteger newSection = [self newSectionForOldSection:oldSection]; - if (newSection == NSNotFound) { - return nil; - } - - NSUInteger newItem = indexPath.item; - NSIndexSet *deletedItemsInOldSection = [self indexesForItemChangesOfType:_ASHierarchyChangeTypeDelete inSection:oldSection]; - newItem -= [deletedItemsInOldSection countOfIndexesInRange:NSMakeRange(0, newItem)]; - - for (_ASHierarchyItemChange *change in _deleteItemChanges) { - // If item was deleted, nil - if ([change.indexPaths containsObject:indexPath]) { - return nil; - } - } - - return [NSIndexPath indexPathForItem:newItem inSection:newSection]; -} - - (void)deleteItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options { [self _ensureNotCompleted];