Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenhuy committed Jul 14, 2017
1 parent f785651 commit 36ebea1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/ASTableView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1499,8 +1499,8 @@ - (void)rangeController:(ASRangeController *)rangeController updateWithChangeSet
return;
}

// Note: Can't adjust content offset if this is a data reload
if (_automaticallyAdjustsContentOffset) {
BOOL shouldAdjustContentOffset = (_automaticallyAdjustsContentOffset && !changeSet.includesReloadData);
if (shouldAdjustContentOffset) {
[self beginAdjustingContentOffset];
}

Expand Down Expand Up @@ -1613,7 +1613,7 @@ - (void)rangeController:(ASRangeController *)rangeController updateWithChangeSet
[_rangeController updateIfNeeded];
[self _scheduleCheckForBatchFetchingForNumberOfChanges:numberOfUpdates];
});
if (_automaticallyAdjustsContentOffset) {
if (shouldAdjustContentOffset) {
[self endAdjustingContentOffsetAnimated:changeSet.animated];
}
[changeSet executeCompletionHandlerWithFinished:YES];
Expand Down

0 comments on commit 36ebea1

Please sign in to comment.