|
1 |
| -diff --git a/node_modules/react-native/React/Views/RCTBorderDrawing.m b/node_modules/react-native/React/Views/RCTBorderDrawing.m |
2 |
| -index 2a8d105..a92db47 100644 |
3 |
| ---- a/node_modules/react-native/React/Views/RCTBorderDrawing.m |
4 |
| -+++ b/node_modules/react-native/React/Views/RCTBorderDrawing.m |
5 |
| -@@ -224,13 +224,15 @@ static CGContextRef RCTUIGraphicsBeginImageContext(CGSize size, CGColorRef backg |
6 |
| - borderInsets.right + MAX(cornerInsets.bottomRight.width, cornerInsets.topRight.width) |
7 |
| - }; |
| 1 | +diff --git a/node_modules/react-native/Libraries/Lists/VirtualizedList.js b/node_modules/react-native/Libraries/Lists/VirtualizedList.js |
| 2 | +index e02c7ad..86da589 100644 |
| 3 | +--- a/node_modules/react-native/Libraries/Lists/VirtualizedList.js |
| 4 | ++++ b/node_modules/react-native/Libraries/Lists/VirtualizedList.js |
| 5 | +@@ -1641,26 +1641,36 @@ class VirtualizedList extends React.PureComponent<Props, State> { |
| 6 | + } |
| 7 | + } |
8 | 8 |
|
9 |
| -- // Asymmetrical edgeInsets cause strange artifacting on iOS 10 and earlier. |
10 |
| -- edgeInsets = (UIEdgeInsets){ |
11 |
| -- MAX(edgeInsets.top, edgeInsets.bottom), |
12 |
| -- MAX(edgeInsets.left, edgeInsets.right), |
13 |
| -- MAX(edgeInsets.top, edgeInsets.bottom), |
14 |
| -- MAX(edgeInsets.left, edgeInsets.right), |
15 |
| -- }; |
16 |
| -+ if (hasCornerRadii) { |
17 |
| -+ // Asymmetrical edgeInsets cause strange artifacting on iOS 10 and earlier. |
18 |
| -+ edgeInsets = (UIEdgeInsets){ |
19 |
| -+ MAX(edgeInsets.top, edgeInsets.bottom), |
20 |
| -+ MAX(edgeInsets.left, edgeInsets.right), |
21 |
| -+ MAX(edgeInsets.top, edgeInsets.bottom), |
22 |
| -+ MAX(edgeInsets.left, edgeInsets.right), |
| 9 | +-class CellRenderer extends React.Component< |
| 10 | +- { |
| 11 | +- CellRendererComponent?: ?React.ComponentType<any>, |
| 12 | +- ItemSeparatorComponent: ?React.ComponentType<*>, |
| 13 | +- cellKey: string, |
| 14 | +- fillRateHelper: FillRateHelper, |
| 15 | +- horizontal: ?boolean, |
| 16 | +- index: number, |
| 17 | +- inversionStyle: ViewStyleProp, |
| 18 | +- item: Item, |
| 19 | +- onLayout: (event: Object) => void, // This is extracted by ScrollViewStickyHeader |
| 20 | +- onUnmount: (cellKey: string) => void, |
| 21 | +- onUpdateSeparators: (cellKeys: Array<?string>, props: Object) => void, |
| 22 | +- parentProps: { |
| 23 | +- getItemLayout?: ?Function, |
| 24 | +- renderItem: renderItemType, |
| 25 | +- }, |
| 26 | +- prevCellKey: ?string, |
| 27 | ++type CellRendererProps = { |
| 28 | ++ CellRendererComponent?: ?React.ComponentType<any>, |
| 29 | ++ ItemSeparatorComponent: ?React.ComponentType<*>, |
| 30 | ++ cellKey: string, |
| 31 | ++ fillRateHelper: FillRateHelper, |
| 32 | ++ horizontal: ?boolean, |
| 33 | ++ index: number, |
| 34 | ++ inversionStyle: ViewStyleProp, |
| 35 | ++ item: Item, |
| 36 | ++ onLayout: (event: Object) => void, // This is extracted by ScrollViewStickyHeader |
| 37 | ++ onUnmount: (cellKey: string) => void, |
| 38 | ++ onUpdateSeparators: (cellKeys: Array<?string>, props: Object) => void, |
| 39 | ++ parentProps: { |
| 40 | ++ getItemLayout?: ?Function, |
| 41 | ++ renderItem?: ?RenderItemType<Item>, |
| 42 | ++ ListItemComponent?: ?(React.ComponentType<any> | React.Element<any>), |
| 43 | + }, |
| 44 | +- $FlowFixMeState, |
| 45 | ++ prevCellKey: ?string, |
| 46 | ++}; |
| 47 | ++ |
| 48 | ++type CellRendererState = { |
| 49 | ++ separatorProps: $ReadOnly<{| |
| 50 | ++ highlighted: boolean, |
| 51 | ++ leadingItem: ?Item, |
| 52 | ++ |}>, |
| 53 | ++}; |
| 54 | ++ |
| 55 | ++class CellRenderer extends React.Component< |
| 56 | ++ CellRendererProps, |
| 57 | ++ CellRendererState, |
| 58 | + > { |
| 59 | + state = { |
| 60 | + separatorProps: { |
| 61 | +@@ -1683,6 +1693,18 @@ class CellRenderer extends React.Component< |
| 62 | + }; |
| 63 | + } |
| 64 | + |
| 65 | ++ static getDerivedStateFromProps( |
| 66 | ++ props: CellRendererProps, |
| 67 | ++ prevState: CellRendererState, |
| 68 | ++ ): ?CellRendererState { |
| 69 | ++ return { |
| 70 | ++ separatorProps: { |
| 71 | ++ ...prevState.separatorProps, |
| 72 | ++ leadingItem: props.item, |
| 73 | ++ }, |
23 | 74 | + };
|
24 | 75 | + }
|
25 |
| - |
26 |
| - const CGSize size = makeStretchable ? (CGSize){ |
27 |
| - // 1pt for the middle stretchable area along each axis |
| 76 | ++ |
| 77 | + // TODO: consider factoring separator stuff out of VirtualizedList into FlatList since it's not |
| 78 | + // reused by SectionList and we can keep VirtualizedList simpler. |
| 79 | + _separators = { |
0 commit comments