Skip to content

Commit

Permalink
Fix crash on Android API 34 and lower
Browse files Browse the repository at this point in the history
  • Loading branch information
robertying committed Jun 21, 2024
1 parent 15b1def commit bc29e53
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions patches/react-native-screens+3.32.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt b/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt
index 458465c..73a2d85 100644
--- a/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt
+++ b/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt
@@ -316,7 +316,7 @@ class ScreenStack(context: Context?) : ScreenContainer(context) {
}

private fun obtainDrawingOp(): DrawingOp =
- if (drawingOpPool.isEmpty()) DrawingOp() else drawingOpPool.removeLast()
+ if (drawingOpPool.isEmpty()) DrawingOp() else drawingOpPool.removeAt(drawingOpPool.size - 1)

private inner class DrawingOp {
var canvas: Canvas? = null

0 comments on commit bc29e53

Please sign in to comment.