Skip to content

Commit d594936

Browse files
committed
Revert "fix patch 007: preserve MVCP spread when removing shouldMaintainVisibleContentPosition"
This reverts commit ebd5a65.
1 parent ebd5a65 commit d594936

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

patches/@shopify/flash-list/@shopify+flash-list+2.3.0+007+fix-scroll-anchor-unmount-on-ios.patch

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
diff --git a/node_modules/@shopify/flash-list/dist/recyclerview/RecyclerView.js b/node_modules/@shopify/flash-list/dist/recyclerview/RecyclerView.js
2+
index ee42f63..4e8d8c0 100644
23
--- a/node_modules/@shopify/flash-list/dist/recyclerview/RecyclerView.js
34
+++ b/node_modules/@shopify/flash-list/dist/recyclerview/RecyclerView.js
4-
@@ -308,16 +308,15 @@
5+
@@ -380,16 +380,14 @@ const RecyclerViewComponent = (props, ref) => {
56
}
67
return onScrollHandler;
78
}, [onScrollHandler, scrollY, stickyHeaders, stickyHeaderUseNativeDriver]);
@@ -10,7 +11,7 @@ diff --git a/node_modules/@shopify/flash-list/dist/recyclerview/RecyclerView.js
1011
- if (shouldMaintainVisibleContentPosition) {
1112
+ if (maintainVisibleContentPosition != null) {
1213
return {
13-
...maintainVisibleContentPosition,
14+
- ...maintainVisibleContentPosition,
1415
minIndexForVisible: 0,
1516
};
1617
}
@@ -20,7 +21,7 @@ diff --git a/node_modules/@shopify/flash-list/dist/recyclerview/RecyclerView.js
2021
const shouldRenderFromBottom = recyclerViewManager.getDataLength() > 0 &&
2122
((_d = maintainVisibleContentPosition === null || maintainVisibleContentPosition === void 0 ? void 0 : maintainVisibleContentPosition.startRenderingFromBottom) !== null && _d !== void 0 ? _d : false);
2223
// Create view for measuring bounded size
23-
@@ -329,11 +328,11 @@
24+
@@ -401,11 +399,11 @@ const RecyclerViewComponent = (props, ref) => {
2425
}, ref: firstChildViewRef }));
2526
}, [horizontal, stickyHeaderOffset]);
2627
const scrollAnchor = useMemo(() => {
@@ -35,9 +36,10 @@ diff --git a/node_modules/@shopify/flash-list/dist/recyclerview/RecyclerView.js
3536
// Render the main RecyclerView structure
3637
return (React.createElement(RecyclerViewContextProvider, { value: recyclerViewContext },
3738
diff --git a/node_modules/@shopify/flash-list/src/recyclerview/RecyclerView.tsx b/node_modules/@shopify/flash-list/src/recyclerview/RecyclerView.tsx
39+
index b2bd67a..d4bf02d 100644
3840
--- a/node_modules/@shopify/flash-list/src/recyclerview/RecyclerView.tsx
3941
+++ b/node_modules/@shopify/flash-list/src/recyclerview/RecyclerView.tsx
40-
@@ -480,18 +480,15 @@
42+
@@ -572,18 +572,14 @@ const RecyclerViewComponent = <T,>(
4143
return onScrollHandler;
4244
}, [onScrollHandler, scrollY, stickyHeaders, stickyHeaderUseNativeDriver]);
4345

@@ -48,7 +50,7 @@ diff --git a/node_modules/@shopify/flash-list/src/recyclerview/RecyclerView.tsx
4850
- if (shouldMaintainVisibleContentPosition) {
4951
+ if (maintainVisibleContentPosition != null) {
5052
return {
51-
...maintainVisibleContentPosition,
53+
- ...maintainVisibleContentPosition,
5254
minIndexForVisible: 0,
5355
};
5456
}
@@ -58,7 +60,7 @@ diff --git a/node_modules/@shopify/flash-list/src/recyclerview/RecyclerView.tsx
5860

5961
const shouldRenderFromBottom =
6062
recyclerViewManager.getDataLength() > 0 &&
61-
@@ -512,7 +509,7 @@
63+
@@ -604,7 +600,7 @@ const RecyclerViewComponent = <T,>(
6264
}, [horizontal, stickyHeaderOffset]);
6365

6466
const scrollAnchor = useMemo(() => {
@@ -67,7 +69,7 @@ diff --git a/node_modules/@shopify/flash-list/src/recyclerview/RecyclerView.tsx
6769
return (
6870
<ScrollAnchor
6971
horizontal={Boolean(horizontal)}
70-
@@ -521,7 +518,7 @@
72+
@@ -613,7 +609,7 @@ const RecyclerViewComponent = <T,>(
7173
);
7274
}
7375
return null;

0 commit comments

Comments
 (0)