Revert "ASDataController now handles reloadData more efficiently and notify its delegate once instead of a series of deletes and inserts"

This reverts commit 2e4d716e0b.

Possible issue with this commit.
This commit is contained in:
Scott Goodson
2016-01-22 20:33:33 -08:00
parent cb5e5704e2
commit 83aaa4637e
8 changed files with 36 additions and 179 deletions

View File

@@ -298,7 +298,10 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
- (void)reloadDataWithCompletion:(void (^)())completion
{
[_dataController reloadDataWithCompletion:completion];
ASPerformBlockOnMainThread(^{
[super reloadData];
});
[_dataController reloadDataWithAnimationOptions:UITableViewRowAnimationNone completion:completion];
}
- (void)reloadData
@@ -309,7 +312,8 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
- (void)reloadDataImmediately
{
ASDisplayNodeAssertMainThread();
[_dataController reloadDataImmediately];
[_dataController reloadDataImmediatelyWithAnimationOptions:UITableViewRowAnimationNone];
[super reloadData];
}
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType
@@ -841,18 +845,6 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
});
}
- (void)rangeControllerDidReloadData:(ASRangeController *)rangeController
{
ASDisplayNodeAssertMainThread();
LOG(@"UITableView reloadData");
if (!self.asyncDataSource) {
return; // if the asyncDataSource has become invalid while we are processing, ignore this request to avoid crashes
}
[super reloadData];
}
#pragma mark - ASDataControllerDelegate
- (ASCellNode *)dataController:(ASDataController *)dataController nodeAtIndexPath:(NSIndexPath *)indexPath