Skip to content

Commit

Permalink
Mobile - Remove RNGestureHandlerEnabledRootView since its now deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerardo committed Oct 11, 2022
1 parent 16e7f95 commit 969ac15
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
25 changes: 14 additions & 11 deletions packages/edit-post/src/editor.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -174,17 +175,19 @@ class Editor extends Component {
};

return (
<SlotFillProvider>
<EditorProvider
settings={ editorSettings }
post={ normalizedPost }
initialEdits={ initialEdits }
useSubRegistry={ false }
{ ...props }
>
<Layout setTitleRef={ this.setTitleRef } />
</EditorProvider>
</SlotFillProvider>
<GestureHandlerRootView style={ { flex: 1 } }>
<SlotFillProvider>
<EditorProvider
settings={ editorSettings }
post={ normalizedPost }
initialEdits={ initialEdits }
useSubRegistry={ false }
{ ...props }
>
<Layout setTitleRef={ this.setTitleRef } />
</EditorProvider>
</SlotFillProvider>
</GestureHandlerRootView>
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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() {
Expand Down

0 comments on commit 969ac15

Please sign in to comment.