From 8efaaee9dcf805314a1bc6b34191bed98b7362ad Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Mon, 2 Dec 2024 09:45:21 +0100 Subject: [PATCH] Update patches --- ...eens+3.34.0+003+fabric-flat-list-fix.patch | 57 ------------------- ...ustom-animations-native-transitions.patch} | 0 ...fix-screen-flicker-on-modal-unmount.patch} | 0 3 files changed, 57 deletions(-) delete mode 100644 patches/react-native-screens+3.34.0+003+fabric-flat-list-fix.patch rename patches/{react-native-screens+3.34.0+004+ios-custom-animations-native-transitions.patch => react-native-screens+3.35.0+002+ios-custom-animations-native-transitions.patch} (100%) rename patches/{react-native-screens+3.34.0+005+fix-screen-flicker-on-modal-unmount.patch => react-native-screens+3.35.0+003+fix-screen-flicker-on-modal-unmount.patch} (100%) diff --git a/patches/react-native-screens+3.34.0+003+fabric-flat-list-fix.patch b/patches/react-native-screens+3.34.0+003+fabric-flat-list-fix.patch deleted file mode 100644 index 3327ed477893..000000000000 --- a/patches/react-native-screens+3.34.0+003+fabric-flat-list-fix.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff --git a/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/Screen.kt b/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/Screen.kt -index 9d08d39..146b9c2 100644 ---- a/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/Screen.kt -+++ b/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/Screen.kt -@@ -18,6 +18,7 @@ import com.facebook.react.uimanager.PixelUtil - import com.facebook.react.uimanager.UIManagerHelper - import com.facebook.react.uimanager.UIManagerModule - import com.swmansion.rnscreens.events.HeaderHeightChangeEvent -+import com.swmansion.rnscreens.ext.isInsideScrollViewWithRemoveClippedSubviews - - @SuppressLint("ViewConstructor") // Only we construct this view, it is never inflated. - class Screen( -@@ -310,6 +311,16 @@ class Screen( - startTransitionRecursive(child.toolbar) - } - if (child is ViewGroup) { -+ // a combination of https://github.com/software-mansion/react-native-screens/pull/2307/files and https://github.com/software-mansion/react-native-screens/pull/2383/files -+ // The children are miscounted when there's a FlatList with -+ // removeClippedSubviews set to true (default). -+ // We add a simple view for each item in the list to make it work as expected. -+ // See https://github.com/software-mansion/react-native-screens/issues/2282 -+ if (child.isInsideScrollViewWithRemoveClippedSubviews()) { -+ for (j in 0 until child.childCount) { -+ child.addView(View(context)) -+ } -+ } - startTransitionRecursive(child) - } - } -diff --git a/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ext/ViewExt.kt b/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ext/ViewExt.kt -new file mode 100644 -index 0000000..9d9fbfd ---- /dev/null -+++ b/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ext/ViewExt.kt -@@ -0,0 +1,21 @@ -+package com.swmansion.rnscreens.ext -+ -+import android.view.View -+import android.view.ViewGroup -+import com.facebook.react.views.scroll.ReactHorizontalScrollView -+import com.facebook.react.views.scroll.ReactScrollView -+import com.swmansion.rnscreens.ScreenStack -+ -+internal fun View.isInsideScrollViewWithRemoveClippedSubviews(): Boolean { -+ if (this is ReactHorizontalScrollView || this is ReactScrollView) { -+ return false -+ } -+ var parentView = this.parent -+ while (parentView is ViewGroup && parentView !is ScreenStack) { -+ if (parentView is ReactScrollView) { -+ return parentView.removeClippedSubviews -+ } -+ parentView = parentView.parent -+ } -+ return false -+} -\ No newline at end of file diff --git a/patches/react-native-screens+3.34.0+004+ios-custom-animations-native-transitions.patch b/patches/react-native-screens+3.35.0+002+ios-custom-animations-native-transitions.patch similarity index 100% rename from patches/react-native-screens+3.34.0+004+ios-custom-animations-native-transitions.patch rename to patches/react-native-screens+3.35.0+002+ios-custom-animations-native-transitions.patch diff --git a/patches/react-native-screens+3.34.0+005+fix-screen-flicker-on-modal-unmount.patch b/patches/react-native-screens+3.35.0+003+fix-screen-flicker-on-modal-unmount.patch similarity index 100% rename from patches/react-native-screens+3.34.0+005+fix-screen-flicker-on-modal-unmount.patch rename to patches/react-native-screens+3.35.0+003+fix-screen-flicker-on-modal-unmount.patch