mattermost-mobile/patches/react-native-navigation+6.4.0.patch
Elias Nahum aaa571db32
Upgrade to RN 0.62.2 (#4093)
* Upgrade to RN 0.62.0

* Update packager module paths

* Fix Android PasteableInput

* Fix regression on Android share extension credentials needed

* Update android/app/src/main/java/com/mattermost/rnbeta/RNPasteableEditTextOnPasteListener.java

* Reject commit if TSC check fails and Fix small eslint issues automatically

* Use super.getExportedCustomBubblingEventTypeConstants in RNPasteableTextInputManager

* Update to rn 0.62.2

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-04-14 16:39:51 -04:00

47 lines
2.8 KiB
Diff

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
--- 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 {
reactContext.addLifecycleEventListener(new LifecycleEventListenerAdapter() {
@Override
public void onHostResume() {
- eventEmitter = new EventEmitter(reactContext);
- navigator().setEventEmitter(eventEmitter);
- layoutFactory.init(
- activity(),
- eventEmitter,
- navigator().getChildRegistry(),
- ((NavigationApplication) activity().getApplication()).getExternalComponents()
- );
+ try {
+ eventEmitter = new EventEmitter(reactContext);
+ navigator().setEventEmitter(eventEmitter);
+ layoutFactory.init(
+ activity(),
+ eventEmitter,
+ navigator().getChildRegistry(),
+ ((NavigationApplication) activity().getApplication()).getExternalComponents()
+ );
+ } 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
+++ b/node_modules/react-native-navigation/lib/ios/RNNCommandsHandler.m
@@ -300,10 +300,9 @@ - (void)dismissAllModals:(NSDictionary *)mergeOptions commandId:(NSString*)comma
[CATransaction begin];
[CATransaction setCompletionBlock:^{
[self->_eventEmitter sendOnNavigationCommandCompletion:dismissAllModals commandId:commandId params:@{}];
- completion();
}];
RNNNavigationOptions* options = [[RNNNavigationOptions alloc] initWithDict:mergeOptions];
- [_modalManager dismissAllModalsAnimated:[options.animations.dismissModal.enable getWithDefaultValue:YES] completion:nil];
+ [_modalManager dismissAllModalsAnimated:[options.animations.dismissModal.enable getWithDefaultValue:YES] completion:completion];
[CATransaction commit];
}