@@ -1442,7 +1442,39 @@ - (void)rangeController:(ASRangeController *)rangeController didUpdateWithChange
14421442 LOG (@" --- UITableView beginUpdates" );
14431443 [super beginUpdates ];
14441444
1445- for (_ASHierarchyItemChange *change in [changeSet itemChangesOfType: _ASHierarchyChangeTypeDelete]) {
1445+ for (_ASHierarchyItemChange *change in [changeSet itemChangesOfType: _ASHierarchyChangeTypeReload]) {
1446+ NSArray <NSIndexPath *> *indexPaths = change.indexPaths ;
1447+ UITableViewRowAnimation animationOptions = (UITableViewRowAnimation)change.animationOptions ;
1448+
1449+ LOG (@" UITableView reloadRows:%ld rows" , indexPaths.count );
1450+ BOOL preventAnimation = animationOptions == UITableViewRowAnimationNone;
1451+ ASPerformBlockWithoutAnimation (preventAnimation, ^{
1452+ if (self.test_enableSuperUpdateCallLogging ) {
1453+ NSLog (@" -[super reloadRowsAtIndexPaths]: %@ " , indexPaths);
1454+ }
1455+ [super reloadRowsAtIndexPaths: indexPaths withRowAnimation: animationOptions];
1456+ });
1457+
1458+ numberOfUpdates++;
1459+ }
1460+
1461+ for (_ASHierarchySectionChange *change in [changeSet sectionChangesOfType: _ASHierarchyChangeTypeReload]) {
1462+ NSIndexSet *sectionIndexes = change.indexSet ;
1463+ UITableViewRowAnimation animationOptions = (UITableViewRowAnimation)change.animationOptions ;
1464+
1465+ LOG (@" UITableView reloadSections:%@ " , sectionIndexes);
1466+ BOOL preventAnimation = (animationOptions == UITableViewRowAnimationNone);
1467+ ASPerformBlockWithoutAnimation (preventAnimation, ^{
1468+ if (self.test_enableSuperUpdateCallLogging ) {
1469+ NSLog (@" -[super reloadSections]: %@ " , sectionIndexes);
1470+ }
1471+ [super reloadSections: sectionIndexes withRowAnimation: animationOptions];
1472+ });
1473+
1474+ numberOfUpdates++;
1475+ }
1476+
1477+ for (_ASHierarchyItemChange *change in [changeSet itemChangesOfType: _ASHierarchyChangeTypeOriginalDelete]) {
14461478 NSArray <NSIndexPath *> *indexPaths = change.indexPaths ;
14471479 UITableViewRowAnimation animationOptions = (UITableViewRowAnimation)change.animationOptions ;
14481480
@@ -1458,7 +1490,7 @@ - (void)rangeController:(ASRangeController *)rangeController didUpdateWithChange
14581490 numberOfUpdates++;
14591491 }
14601492
1461- for (_ASHierarchySectionChange *change in [changeSet sectionChangesOfType: _ASHierarchyChangeTypeDelete ]) {
1493+ for (_ASHierarchySectionChange *change in [changeSet sectionChangesOfType: _ASHierarchyChangeTypeOriginalDelete ]) {
14621494 NSIndexSet *sectionIndexes = change.indexSet ;
14631495 UITableViewRowAnimation animationOptions = (UITableViewRowAnimation)change.animationOptions ;
14641496
@@ -1474,7 +1506,7 @@ - (void)rangeController:(ASRangeController *)rangeController didUpdateWithChange
14741506 numberOfUpdates++;
14751507 }
14761508
1477- for (_ASHierarchySectionChange *change in [changeSet sectionChangesOfType: _ASHierarchyChangeTypeInsert ]) {
1509+ for (_ASHierarchySectionChange *change in [changeSet sectionChangesOfType: _ASHierarchyChangeTypeOriginalInsert ]) {
14781510 NSIndexSet *sectionIndexes = change.indexSet ;
14791511 UITableViewRowAnimation animationOptions = (UITableViewRowAnimation)change.animationOptions ;
14801512
@@ -1490,7 +1522,7 @@ - (void)rangeController:(ASRangeController *)rangeController didUpdateWithChange
14901522 numberOfUpdates++;
14911523 }
14921524
1493- for (_ASHierarchyItemChange *change in [changeSet itemChangesOfType: _ASHierarchyChangeTypeInsert ]) {
1525+ for (_ASHierarchyItemChange *change in [changeSet itemChangesOfType: _ASHierarchyChangeTypeOriginalInsert ]) {
14941526 NSArray <NSIndexPath *> *indexPaths = change.indexPaths ;
14951527 UITableViewRowAnimation animationOptions = (UITableViewRowAnimation)change.animationOptions ;
14961528
0 commit comments