From 84e8b2686c84edd98f53f4d15fe6b819bb840fc9 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Fri, 24 Jun 2016 13:03:51 -0700 Subject: [PATCH] [ASDataController] Combine isolated reloads into a batch --- AsyncDisplayKit/Details/ASChangeSetDataController.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AsyncDisplayKit/Details/ASChangeSetDataController.m b/AsyncDisplayKit/Details/ASChangeSetDataController.m index 7802a6c1..f6615d1b 100644 --- a/AsyncDisplayKit/Details/ASChangeSetDataController.m +++ b/AsyncDisplayKit/Details/ASChangeSetDataController.m @@ -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]; } }