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,29 @@ /** * 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..3fd9cae 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'); +@@ -2173,6 +2174,10 @@ 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