Files
mattermost-mobile/patches/react-native+0.69.3.patch
Elias Nahum dcc05956b6 Gekidou upgrade RN to 0.69.3 and dependencies (#6537)
* module dependencies

* update fastlane

* upgrade types dependencies

* update dev deps

* update react-native-notifications

* update react-native-keychain

* update sentry

* update detox

* Upgrade to RN 69.3

* increase MaxMetaspaceSize gradle opts

* feedback review
2022-08-08 09:06:20 -04:00

120 lines
4.9 KiB
Diff

diff --git a/node_modules/react-native/Libraries/Components/ScrollView/ScrollView.js b/node_modules/react-native/Libraries/Components/ScrollView/ScrollView.js
index c3eccd2..77c9e13 100644
--- a/node_modules/react-native/Libraries/Components/ScrollView/ScrollView.js
+++ b/node_modules/react-native/Libraries/Components/ScrollView/ScrollView.js
@@ -1784,9 +1784,15 @@ class ScrollView extends React.Component<Props, State> {
// Note: we should split props.style on the inner and outer props
// however, the ScrollView still needs the baseStyle to be scrollable
const {outer, inner} = splitLayoutProps(flattenStyle(props.style));
+ let inverted;
+ if (inner.scaleY) {
+ inverted = {scaleY: -1};
+ delete inner['scaleY']
+ }
+
return React.cloneElement(
refreshControl,
- {style: StyleSheet.compose(baseStyle, outer)},
+ {style: [baseStyle, outer, inverted]},
<NativeDirectionalScrollView
{...props}
style={StyleSheet.compose(baseStyle, inner)}
diff --git a/node_modules/react-native/Libraries/Lists/VirtualizedList.js b/node_modules/react-native/Libraries/Lists/VirtualizedList.js
index 258a12e..a756dc3 100644
--- a/node_modules/react-native/Libraries/Lists/VirtualizedList.js
+++ b/node_modules/react-native/Libraries/Lists/VirtualizedList.js
@@ -10,6 +10,7 @@
const Batchinator = require('../Interaction/Batchinator');
const FillRateHelper = require('./FillRateHelper');
+const Platform = require('../Utilities/Platform');
const ReactNative = require('../Renderer/shims/ReactNative');
const RefreshControl = require('../Components/RefreshControl/RefreshControl');
const ScrollView = require('../Components/ScrollView/ScrollView');
@@ -1932,7 +1933,7 @@ type CellRendererState = {
...
};
-class CellRenderer extends React.Component<
+class CellRenderer extends React.PureComponent<
CellRendererProps,
CellRendererState,
> {
@@ -1947,12 +1948,16 @@ class CellRenderer extends React.Component<
props: CellRendererProps,
prevState: CellRendererState,
): ?CellRendererState {
- return {
- separatorProps: {
- ...prevState.separatorProps,
- leadingItem: props.item,
- },
- };
+ if (prevState.separatorProps.leadingItem !== props.item) {
+ return {
+ separatorProps: {
+ ...prevState.separatorProps,
+ leadingItem: props.item,
+ },
+ };
+ } else {
+ return prevState;
+ }
}
// TODO: consider factoring separator stuff out of VirtualizedList into FlatList since it's not
@@ -2125,7 +2130,14 @@ function describeNestedLists(childList: {
const styles = StyleSheet.create({
verticallyInverted: {
- transform: [{scaleY: -1}],
+ ...Platform.select({
+ android: {
+ scaleY: -1,
+ },
+ ios: {
+ transform: [{scaleY: -1}],
+ },
+ }),
},
horizontallyInverted: {
transform: [{scaleX: -1}],
diff --git a/node_modules/react-native/react.gradle b/node_modules/react-native/react.gradle
index 2e9d8e5..8d6c26d 100644
--- a/node_modules/react-native/react.gradle
+++ b/node_modules/react-native/react.gradle
@@ -139,7 +139,7 @@ def enableHermesForVariant = config.enableHermesForVariant ?: {
def hermesFlagsForVariant = config.hermesFlagsForVariant ?: {
def variant ->
def hermesFlags;
- if (variant.name.toLowerCase().contains("release")) {
+ if (variant.name.toLowerCase().contains("release") || variant.name.toLowerCase().contains("unsigned")) {
// Can't use ?: since that will also substitute valid empty lists
hermesFlags = config.hermesFlagsRelease
if (hermesFlags == null) hermesFlags = ["-O", "-output-source-map"]
@@ -155,7 +155,7 @@ def hermesFlagsForVariant = config.hermesFlagsForVariant ?: {
def disableDevForVariant = config.disableDevForVariant ?: {
def variant ->
config."devDisabledIn${variant.name.capitalize()}" ||
- variant.name.toLowerCase().contains("release")
+ variant.name.toLowerCase().contains("release") || variant.name.toLowerCase().contains("unsigned")
}
// Set bundleForVariant to a function to configure per variant,
@@ -164,13 +164,13 @@ def bundleForVariant = config.bundleForVariant ?: {
def variant ->
config."bundleIn${variant.name.capitalize()}" ||
config."bundleIn${variant.buildType.name.capitalize()}" ||
- variant.name.toLowerCase().contains("release")
+ variant.name.toLowerCase().contains("release") || variant.name.toLowerCase().contains("unsigned")
}
// Set deleteDebugFilesForVariant to a function to configure per variant,
// defaults to True for Release variants and False for debug variants
def deleteDebugFilesForVariant = config.deleteDebugFilesForVariant ?: {
- def variant -> variant.name.toLowerCase().contains("release")
+ def variant -> variant.name.toLowerCase().contains("release") || variant.name.toLowerCase().contains("unsigned")
}
android {