@@ -73,7 +73,6 @@ - (void)willReloadData
7373 [self batchLayoutNodesFromContexts: contexts ofKind: kind completion: ^(NSArray <ASCellNode *> *nodes, NSArray <NSIndexPath *> *indexPaths) {
7474 [self insertNodes: nodes ofKind: kind atIndexPaths: indexPaths completion: nil ];
7575 }];
76-
7776 [_pendingContexts removeObjectForKey: kind];
7877 }
7978}
@@ -102,7 +101,6 @@ - (void)willInsertSections:(NSIndexSet *)sections
102101 [self batchLayoutNodesFromContexts: contexts ofKind: kind completion: ^(NSArray <ASCellNode *> *nodes, NSArray <NSIndexPath *> *indexPaths) {
103102 [self insertNodes: nodes ofKind: kind atIndexPaths: indexPaths completion: nil ];
104103 }];
105-
106104 [_pendingContexts removeObjectForKey: kind];
107105 }
108106}
@@ -137,7 +135,6 @@ - (void)willReloadSections:(NSIndexSet *)sections
137135 [self batchLayoutNodesFromContexts: contexts ofKind: kind completion: ^(NSArray <ASCellNode *> *nodes, NSArray <NSIndexPath *> *indexPaths) {
138136 [self insertNodes: nodes ofKind: kind atIndexPaths: indexPaths completion: nil ];
139137 }];
140-
141138 [_pendingContexts removeObjectForKey: kind];
142139 }
143140}
@@ -178,7 +175,6 @@ - (void)willInsertRowsAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths
178175 [self batchLayoutNodesFromContexts: contexts ofKind: kind completion: ^(NSArray <ASCellNode *> *nodes, NSArray <NSIndexPath *> *indexPaths) {
179176 [self insertNodes: nodes ofKind: kind atIndexPaths: indexPaths completion: nil ];
180177 }];
181-
182178 [_pendingContexts removeObjectForKey: kind];
183179 }
184180}
@@ -205,13 +201,12 @@ - (void)willReloadRowsAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths
205201 NSArray *keys = _pendingContexts.allKeys ;
206202 for (NSString *kind in keys) {
207203 NSMutableArray <ASIndexedNodeContext *> *contexts = _pendingContexts[kind];
208-
204+
209205 [self deleteNodesOfKind: kind atIndexPaths: indexPaths completion: nil ];
210206 // reinsert the elements
211207 [self batchLayoutNodesFromContexts: contexts ofKind: kind completion: ^(NSArray <ASCellNode *> *nodes, NSArray <NSIndexPath *> *indexPaths) {
212208 [self insertNodes: nodes ofKind: kind atIndexPaths: indexPaths completion: nil ];
213209 }];
214-
215210 [_pendingContexts removeObjectForKey: kind];
216211 }
217212}
0 commit comments