Skip to content

Commit

Permalink
[RTL] Guard access of flipsHorizontallyInOppositeLayoutDirection for …
Browse files Browse the repository at this point in the history
…iOS >= 11 (TextureGroup#2003)

`flipsHorizontallyInOppositeLayoutDirection` is available in iOS11 and greater. Texture still supports iOS9 so we need to make sure not to call this it in those cases.
  • Loading branch information
rcancro authored and muukii committed Dec 13, 2024
1 parent 014a060 commit 22682a6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Source/ASCollectionView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1859,8 +1859,11 @@ - (void)_beginBatchFetchingIfNeededWithContentOffset:(CGPoint)contentOffset velo
{
// Since we are accessing self.collectionViewLayout, we should make sure we are on main
ASDisplayNodeAssertMainThread();

if (ASDisplayShouldFetchBatchForScrollView(self, self.scrollDirection, self.scrollableDirections, contentOffset, velocity, self.collectionViewLayout.flipsHorizontallyInOppositeLayoutDirection)) {
BOOL flipsHorizontallyInOppositeLayoutDirection = NO;
if (AS_AVAILABLE_IOS(11.0)) {
flipsHorizontallyInOppositeLayoutDirection = self.collectionViewLayout.flipsHorizontallyInOppositeLayoutDirection;
}
if (ASDisplayShouldFetchBatchForScrollView(self, self.scrollDirection, self.scrollableDirections, contentOffset, velocity, flipsHorizontallyInOppositeLayoutDirection)) {
[self _beginBatchFetching];
}
}
Expand Down

0 comments on commit 22682a6

Please sign in to comment.