Skip to content

Commit ca20b6e

Browse files
author
GianmarcoFolchi
committed
Address PR comments
1 parent 1d63a8c commit ca20b6e

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

Source/ASCollectionNode.mm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ - (instancetype)init
8282
_flags.inverted = NO;
8383
_contentInset = UIEdgeInsetsZero;
8484
_contentOffset = CGPointZero;
85+
_leadingScreensForBatching = 2.0;
8586
_flags.animatesContentOffset = NO;
8687
_flags.showsVerticalScrollIndicator = YES;
8788
_flags.showsHorizontalScrollIndicator = YES;
@@ -323,6 +324,7 @@ - (void)didLoad
323324
view.layoutInspector = pendingState.layoutInspector;
324325
view.showsVerticalScrollIndicator = pendingState.showsVerticalScrollIndicator;
325326
view.showsHorizontalScrollIndicator = pendingState.showsHorizontalScrollIndicator;
327+
view.leadingScreensForBatching = pendingState.leadingScreensForBatching;
326328
#if !TARGET_OS_TV
327329
view.pagingEnabled = pendingState.pagingEnabled;
328330
#endif
@@ -345,10 +347,6 @@ - (void)didLoad
345347
[view setContentOffset:contentOffset animated:pendingState.animatesContentOffset];
346348
}
347349

348-
if (pendingState.leadingScreensForBatching != 0) {
349-
view.leadingScreensForBatching = pendingState.leadingScreensForBatching;
350-
}
351-
352350
const auto tuningParametersVector = pendingState->_tuningParameters;
353351
const auto tuningParametersVectorSize = tuningParametersVector.size();
354352
for (NSInteger rangeMode = 0; rangeMode < tuningParametersVectorSize; rangeMode++) {

Source/ASTableNode.mm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ - (void)didLoad
163163
view.allowsMultipleSelection = pendingState.allowsMultipleSelection;
164164
view.allowsMultipleSelectionDuringEditing = pendingState.allowsMultipleSelectionDuringEditing;
165165
view.automaticallyAdjustsContentOffset = pendingState.automaticallyAdjustsContentOffset;
166+
view.leadingScreensForBatching = pendingState.leadingScreensForBatching;
166167
#if !TARGET_OS_TV
167168
view.pagingEnabled = pendingState.pagingEnabled;
168169
#endif
@@ -176,10 +177,6 @@ - (void)didLoad
176177
if (!CGPointEqualToPoint(contentOffset, CGPointZero)) {
177178
[view setContentOffset:contentOffset animated:pendingState.animatesContentOffset];
178179
}
179-
180-
if (pendingState.leadingScreensForBatching != 0) {
181-
view.leadingScreensForBatching = pendingState.leadingScreensForBatching;
182-
}
183180

184181
const auto tuningParametersVector = pendingState->_tuningParameters;
185182
const auto tuningParametersVectorSize = tuningParametersVector.size();

0 commit comments

Comments
 (0)