diff --git a/patches/react-native-navigation+6.4.0.patch b/patches/react-native-navigation+6.4.0.patch index 45d54ff1c..261c100bd 100644 --- a/patches/react-native-navigation+6.4.0.patch +++ b/patches/react-native-navigation+6.4.0.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationModule.java b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationModule.java -index 260ed81..52b53d8 100644 +index 260ed81..f719679 100644 --- a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationModule.java +++ b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationModule.java @@ -56,14 +56,18 @@ public class NavigationModule extends ReactContextBaseJavaModule { @@ -29,6 +29,21 @@ index 260ed81..52b53d8 100644 } }); } +@@ -196,8 +200,12 @@ public class NavigationModule extends ReactContextBaseJavaModule { + + protected void handle(Runnable task) { + UiThread.post(() -> { +- if (getCurrentActivity() != null && !activity().isFinishing()) { +- task.run(); ++ try { ++ if (getCurrentActivity() != null && !activity().isFinishing()) { ++ task.run(); ++ } ++ } catch (ClassCastException e) { ++ // The most current activity is not a NavigationActivity + } + }); + } diff --git a/node_modules/react-native-navigation/lib/ios/RNNCommandsHandler.m b/node_modules/react-native-navigation/lib/ios/RNNCommandsHandler.m index ae8be52..8a8dec5 100644 --- a/node_modules/react-native-navigation/lib/ios/RNNCommandsHandler.m