From fcfab01375ae42e2d8485a70788756f117aefcc3 Mon Sep 17 00:00:00 2001 From: Kyle Tee Date: Sun, 16 Sep 2018 12:06:49 +0200 Subject: [PATCH] Fix React Native 0.57 compatibility (https://github.com/wix/react-native-navigation/issues/3831) --- .../react/NavigationReactNativeHost.java | 2 +- .../react/SyncUiImplementation.java | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationReactNativeHost.java b/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationReactNativeHost.java index 02cd1dc5bb8..31f5601c3c5 100644 --- a/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationReactNativeHost.java +++ b/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationReactNativeHost.java @@ -83,7 +83,7 @@ protected ReactInstanceManager createReactInstanceManager() { .setUseDeveloperSupport(getUseDeveloperSupport()) .setRedBoxHandler(getRedBoxHandler()) .setJavaScriptExecutorFactory(getJavaScriptExecutorFactory()) - .setUIImplementationProvider(getUIImplementationProvider()) +// .setUIImplementationProvider(getUIImplementationProvider()) .setInitialLifecycleState(LifecycleState.BEFORE_CREATE) .setDevBundleDownloadListener(getDevBundleDownloadListener()); diff --git a/lib/android/app/src/reactNative56/java/com/reactnativenavigation/react/SyncUiImplementation.java b/lib/android/app/src/reactNative56/java/com/reactnativenavigation/react/SyncUiImplementation.java index 36b53b8ef7b..38b9a13042e 100644 --- a/lib/android/app/src/reactNative56/java/com/reactnativenavigation/react/SyncUiImplementation.java +++ b/lib/android/app/src/reactNative56/java/com/reactnativenavigation/react/SyncUiImplementation.java @@ -7,7 +7,7 @@ import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.UIImplementation; -import com.facebook.react.uimanager.UIImplementationProvider; +//import com.facebook.react.uimanager.UIImplementationProvider; import com.facebook.react.uimanager.UIManagerModule; import com.facebook.react.uimanager.ViewManager; import com.facebook.react.uimanager.common.MeasureSpecProvider; @@ -20,17 +20,17 @@ public class SyncUiImplementation extends UIImplementation { private static final Object lock = new Object(); - public static class Provider extends UIImplementationProvider { - @Override - public UIImplementation createUIImplementation(ReactApplicationContext reactContext, List viewManagerList, EventDispatcher eventDispatcher, int minTimeLeftInFrameForNonBatchedOperationMs) { - return new SyncUiImplementation(reactContext, viewManagerList, eventDispatcher, minTimeLeftInFrameForNonBatchedOperationMs); - } - - @Override - public UIImplementation createUIImplementation(ReactApplicationContext reactContext, UIManagerModule.ViewManagerResolver viewManagerResolver, EventDispatcher eventDispatcher, int minTimeLeftInFrameForNonBatchedOperationMs) { - return new SyncUiImplementation(reactContext, viewManagerResolver, eventDispatcher, minTimeLeftInFrameForNonBatchedOperationMs); - } - } +// public static class Provider extends UIImplementationProvider { +// @Override +// public UIImplementation createUIImplementation(ReactApplicationContext reactContext, List viewManagerList, EventDispatcher eventDispatcher, int minTimeLeftInFrameForNonBatchedOperationMs) { +// return new SyncUiImplementation(reactContext, viewManagerList, eventDispatcher, minTimeLeftInFrameForNonBatchedOperationMs); +// } +// +// @Override +// public UIImplementation createUIImplementation(ReactApplicationContext reactContext, UIManagerModule.ViewManagerResolver viewManagerResolver, EventDispatcher eventDispatcher, int minTimeLeftInFrameForNonBatchedOperationMs) { +// return new SyncUiImplementation(reactContext, viewManagerResolver, eventDispatcher, minTimeLeftInFrameForNonBatchedOperationMs); +// } +// } public SyncUiImplementation(ReactApplicationContext reactContext, List viewManagerList, EventDispatcher eventDispatcher, int minTimeLeftInFrameForNonBatchedOperationMs) { super(reactContext, viewManagerList, eventDispatcher, minTimeLeftInFrameForNonBatchedOperationMs);