Carry over first-pass change set improvements

This commit is contained in:
Adlai Holler
2016-06-23 15:52:00 -07:00
parent 77f24231b3
commit 71d9f64535
10 changed files with 224 additions and 60 deletions

View File

@@ -145,6 +145,7 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
// Always set, whether ASCollectionView is created directly or via ASCollectionNode.
@property (nonatomic, weak) ASTableNode *tableNode;
@property (nonatomic) BOOL test_enableSuperUpdateCallLogging;
@end
@implementation ASTableView
@@ -974,6 +975,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
BOOL preventAnimation = animationOptions == UITableViewRowAnimationNone;
ASPerformBlockWithoutAnimation(preventAnimation, ^{
if (self.test_enableSuperUpdateCallLogging) {
NSLog(@"-[super insertRowsAtIndexPaths]: %@", indexPaths);
}
[super insertRowsAtIndexPaths:indexPaths withRowAnimation:(UITableViewRowAnimation)animationOptions];
[self _scheduleCheckForBatchFetchingForNumberOfChanges:indexPaths.count];
});
@@ -994,6 +998,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
BOOL preventAnimation = animationOptions == UITableViewRowAnimationNone;
ASPerformBlockWithoutAnimation(preventAnimation, ^{
if (self.test_enableSuperUpdateCallLogging) {
NSLog(@"-[super deleteRowsAtIndexPaths]: %@", indexPaths);
}
[super deleteRowsAtIndexPaths:indexPaths withRowAnimation:(UITableViewRowAnimation)animationOptions];
[self _scheduleCheckForBatchFetchingForNumberOfChanges:indexPaths.count];
});
@@ -1015,6 +1022,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
BOOL preventAnimation = animationOptions == UITableViewRowAnimationNone;
ASPerformBlockWithoutAnimation(preventAnimation, ^{
if (self.test_enableSuperUpdateCallLogging) {
NSLog(@"-[super insertSections]: %@", indexSet);
}
[super insertSections:indexSet withRowAnimation:(UITableViewRowAnimation)animationOptions];
[self _scheduleCheckForBatchFetchingForNumberOfChanges:indexSet.count];
});
@@ -1031,6 +1041,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
BOOL preventAnimation = animationOptions == UITableViewRowAnimationNone;
ASPerformBlockWithoutAnimation(preventAnimation, ^{
if (self.test_enableSuperUpdateCallLogging) {
NSLog(@"-[super deleteSections]: %@", indexSet);
}
[super deleteSections:indexSet withRowAnimation:(UITableViewRowAnimation)animationOptions];
[self _scheduleCheckForBatchFetchingForNumberOfChanges:indexSet.count];
});