Dispatch batch update to main #trivial (#626)

* Dispatch batch update to main

* TableView too
This commit is contained in:
Garrett Moon
2017-10-20 15:01:38 -07:00
committed by GitHub
parent 919ec8d32b
commit d31af734df
2 changed files with 9 additions and 2 deletions

View File

@@ -1587,7 +1587,9 @@ static NSString * const kReuseIdentifier = @"_ASCollectionReuseIdentifier";
{ {
if (_leadingScreensForBatching != leadingScreensForBatching) { if (_leadingScreensForBatching != leadingScreensForBatching) {
_leadingScreensForBatching = leadingScreensForBatching; _leadingScreensForBatching = leadingScreensForBatching;
[self _checkForBatchFetching]; ASPerformBlockOnMainThread(^{
[self _checkForBatchFetching];
});
} }
} }

View File

@@ -1318,7 +1318,12 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
- (void)setLeadingScreensForBatching:(CGFloat)leadingScreensForBatching - (void)setLeadingScreensForBatching:(CGFloat)leadingScreensForBatching
{ {
_leadingScreensForBatching = leadingScreensForBatching; if (_leadingScreensForBatching != leadingScreensForBatching) {
_leadingScreensForBatching = leadingScreensForBatching;
ASPerformBlockOnMainThread(^{
[self _checkForBatchFetching];
});
}
} }
- (BOOL)automaticallyAdjustsContentOffset - (BOOL)automaticallyAdjustsContentOffset