From 969ac15a5e4b424d34a9dc7f9805d4176200534c Mon Sep 17 00:00:00 2001 From: Gerardo Date: Tue, 11 Oct 2022 13:25:01 +0200 Subject: [PATCH] Mobile - Remove RNGestureHandlerEnabledRootView since its now deprecated --- packages/edit-post/src/editor.native.js | 25 +++++++++++-------- .../WPAndroidGlue/WPAndroidGlueCode.java | 3 +-- .../main/java/com/gutenberg/MainActivity.java | 7 ------ 3 files changed, 15 insertions(+), 20 deletions(-) diff --git a/packages/edit-post/src/editor.native.js b/packages/edit-post/src/editor.native.js index d600a8ea8dec55..6638c3bd05e0eb 100644 --- a/packages/edit-post/src/editor.native.js +++ b/packages/edit-post/src/editor.native.js @@ -4,6 +4,7 @@ import memize from 'memize'; import { map, without } from 'lodash'; import { I18nManager } from 'react-native'; +import { GestureHandlerRootView } from 'react-native-gesture-handler'; /** * WordPress dependencies @@ -174,17 +175,19 @@ class Editor extends Component { }; return ( - - - - - + + + + + + + ); } } diff --git a/packages/react-native-bridge/android/react-native-bridge/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java b/packages/react-native-bridge/android/react-native-bridge/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java index 74236bb49bcd8c..bd3111e846325a 100644 --- a/packages/react-native-bridge/android/react-native-bridge/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java +++ b/packages/react-native-bridge/android/react-native-bridge/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java @@ -45,7 +45,6 @@ import com.reactnativecommunity.slider.ReactSliderPackage; import org.linusu.RNGetRandomValuesPackage; import com.reactnativecommunity.webview.RNCWebViewPackage; -import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView; import com.swmansion.gesturehandler.RNGestureHandlerPackage; import com.swmansion.reanimated.ReanimatedJSIModulePackage; import com.swmansion.reanimated.ReanimatedPackage; @@ -615,7 +614,7 @@ public void onCreateView(Context initContext, mIsDarkMode = gutenbergProps.isDarkMode(); mExceptionLogger = exceptionLogger; mBreadcrumbLogger = breadcrumbLogger; - mReactRootView = new RNGestureHandlerEnabledRootView(new MutableContextWrapper(initContext)); + mReactRootView = new ReactRootView(new MutableContextWrapper(initContext)); mReactRootView.setBackgroundColor(colorBackground); ReactInstanceManagerBuilder builder = diff --git a/packages/react-native-editor/android/app/src/main/java/com/gutenberg/MainActivity.java b/packages/react-native-editor/android/app/src/main/java/com/gutenberg/MainActivity.java index 447f2d35ee4ded..ae81e808011eaf 100644 --- a/packages/react-native-editor/android/app/src/main/java/com/gutenberg/MainActivity.java +++ b/packages/react-native-editor/android/app/src/main/java/com/gutenberg/MainActivity.java @@ -6,8 +6,6 @@ import com.facebook.react.ReactActivity; import com.facebook.react.ReactActivityDelegate; -import com.facebook.react.ReactRootView; -import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView; import org.wordpress.mobile.WPAndroidGlue.GutenbergProps; @@ -27,11 +25,6 @@ protected String getMainComponentName() { @Override protected ReactActivityDelegate createReactActivityDelegate() { return new ReactActivityDelegate(this, getMainComponentName()) { - @Override - protected ReactRootView createRootView() { - return new RNGestureHandlerEnabledRootView(MainActivity.this); - } - @Nullable @Override protected Bundle getLaunchOptions() {