[ASDataController] Combine isolated reloads into a batch

This commit is contained in:
Adlai Holler
2016-06-24 13:03:51 -07:00
parent 5d72f2f2cc
commit 84e8b2686c

View File

@@ -109,8 +109,10 @@
if ([self batchUpdating]) {
[_changeSet reloadSections:sections animationOptions:animationOptions];
} else {
[self beginUpdates];
[super deleteSections:sections withAnimationOptions:animationOptions];
[super insertSections:sections withAnimationOptions:animationOptions];
[self endUpdates];
}
}
@@ -153,8 +155,10 @@
if ([self batchUpdating]) {
[_changeSet reloadItems:indexPaths animationOptions:animationOptions];
} else {
[self beginUpdates];
[super deleteRowsAtIndexPaths:indexPaths withAnimationOptions:animationOptions];
[super insertRowsAtIndexPaths:indexPaths withAnimationOptions:animationOptions];
[self endUpdates];
}
}