Page MenuHomePhabricator

D6193.id20708.diff
No OneTemporary

D6193.id20708.diff

diff --git a/native/index.js b/native/index.js
--- a/native/index.js
+++ b/native/index.js
@@ -1,6 +1,16 @@
// @flow
+/* eslint-disable import/order */
+
import 'react-native-gesture-handler';
+
+// react-native has an issue with inverted lists on Android, and it got worse
+// with Android 13. To avoid it we patch a react-native style, but that style
+// got deprecated in React Native 0.70. For now the deprecation is limited to a
+// JS runtime check, which we disable here.
+import ViewReactNativeStyleAttributes from 'react-native/Libraries/Components/View/ReactNativeStyleAttributes';
+ViewReactNativeStyleAttributes.scaleY = true;
+
import './reactotron';
import './config';
diff --git a/patches/react-native+0.70.6.patch b/patches/react-native+0.70.6.patch
--- a/patches/react-native+0.70.6.patch
+++ b/patches/react-native+0.70.6.patch
@@ -16,6 +16,32 @@
/**
* When the clear button should appear on the right side of the text view.
* This property is supported only for single-line TextInput component.
+diff --git a/node_modules/react-native/Libraries/Lists/VirtualizedList.js b/node_modules/react-native/Libraries/Lists/VirtualizedList.js
+index 69e6309..5343e6a 100644
+--- a/node_modules/react-native/Libraries/Lists/VirtualizedList.js
++++ b/node_modules/react-native/Libraries/Lists/VirtualizedList.js
+@@ -34,6 +34,7 @@ const RefreshControl = require('../Components/RefreshControl/RefreshControl');
+ const ScrollView = require('../Components/ScrollView/ScrollView');
+ const View = require('../Components/View/View');
+ const Batchinator = require('../Interaction/Batchinator');
++const Platform = require('../Utilities/Platform');
+ const ReactNative = require('../Renderer/shims/ReactNative');
+ const flattenStyle = require('../StyleSheet/flattenStyle');
+ const StyleSheet = require('../StyleSheet/StyleSheet');
+@@ -2170,9 +2171,10 @@ function describeNestedLists(childList: {
+ }
+
+ const styles = StyleSheet.create({
+- verticallyInverted: {
+- transform: [{scaleY: -1}],
+- },
++ verticallyInverted:
++ Platform.OS === 'android'
++ ? { scaleY: -1 }
++ : { transform: [{scaleY: -1}] },
+ horizontallyInverted: {
+ transform: [{scaleX: -1}],
+ },
diff --git a/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.h b/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.h
index 5ccb6b6..1f326d4 100644
--- a/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.h

File Metadata

Mime Type
text/plain
Expires
Sat, Sep 21, 11:34 AM (22 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2160940
Default Alt Text
D6193.id20708.diff (2 KB)

Event Timeline