Skip to content

Commit 19df50a

Browse files
garrettmoonBuildkite
authored andcommitted
If we check for batching before content size is available we'll always fetch
1 parent 6428077 commit 19df50a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Source/ASCollectionView.mm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1685,7 +1685,8 @@ - (void)setLeadingScreensForBatching:(CGFloat)leadingScreensForBatching
16851685
{
16861686
if (_leadingScreensForBatching != leadingScreensForBatching) {
16871687
_leadingScreensForBatching = leadingScreensForBatching;
1688-
ASPerformBlockOnMainThread(^{
1688+
// Push this to the next runloop to be sure the scroll view has the right content size
1689+
dispatch_async(dispatch_get_main_queue(), ^{
16891690
[self _checkForBatchFetching];
16901691
});
16911692
}

0 commit comments

Comments
 (0)