Revert commit 83aaa46, thus bring 2e4d716 back

This commit is contained in:
Huy Nguyen
2016-01-24 22:49:52 -08:00
parent b3239b6d36
commit 209425c22c
7 changed files with 178 additions and 35 deletions

View File

@@ -298,10 +298,7 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
- (void)reloadDataWithCompletion:(void (^)())completion
{
ASPerformBlockOnMainThread(^{
[super reloadData];
});
[_dataController reloadDataWithAnimationOptions:UITableViewRowAnimationNone completion:completion];
[_dataController reloadDataWithCompletion:completion];
}
- (void)reloadData
@@ -312,8 +309,7 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
- (void)reloadDataImmediately
{
ASDisplayNodeAssertMainThread();
[_dataController reloadDataImmediatelyWithAnimationOptions:UITableViewRowAnimationNone];
[super reloadData];
[_dataController reloadDataImmediately];
}
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType
@@ -845,6 +841,18 @@ 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