From 001765a85eb4f8f6ffe64267ef6a29f0b7c098ff Mon Sep 17 00:00:00 2001 From: Garrett Moon Date: Sun, 3 Mar 2019 17:33:32 -0800 Subject: [PATCH] If we check for batching before content size is available we'll always fetch (#1355) --- Source/ASCollectionView.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/ASCollectionView.mm b/Source/ASCollectionView.mm index 395b6938a1..21ff2a4a96 100644 --- a/Source/ASCollectionView.mm +++ b/Source/ASCollectionView.mm @@ -1685,7 +1685,8 @@ static NSString * const kReuseIdentifier = @"_ASCollectionReuseIdentifier"; { if (_leadingScreensForBatching != leadingScreensForBatching) { _leadingScreensForBatching = leadingScreensForBatching; - ASPerformBlockOnMainThread(^{ + // Push this to the next runloop to be sure the scroll view has the right content size + dispatch_async(dispatch_get_main_queue(), ^{ [self _checkForBatchFetching]; }); }