Update react-navigation

parent af05411a
......@@ -147,6 +147,7 @@ android {
}
dependencies {
implementation project(':react-native-gesture-handler')
implementation project(':react-native-sentry')
implementation project(':react-native-locale-detector')
implementation project(':react-native-vector-icons')
......
package com.thaliapp;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
public class MainActivity extends ReactActivity {
......@@ -12,4 +15,14 @@ public class MainActivity extends ReactActivity {
protected String getMainComponentName() {
return "ThaliApp";
}
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new ReactActivityDelegate(this, getMainComponentName()) {
@Override
protected ReactRootView createRootView() {
return new RNGestureHandlerEnabledRootView(MainActivity.this);
}
};
}
}
......@@ -3,6 +3,7 @@ package com.thaliapp;
import android.app.Application;
import com.facebook.react.ReactApplication;
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
import cl.json.ShareApplication;
import cl.json.RNSharePackage;
......@@ -35,6 +36,7 @@ public class MainApplication extends Application implements ShareApplication, Re
protected List<ReactPackage> getPackages() {
return Arrays.asList(
new MainReactPackage(),
new RNGestureHandlerPackage(),
new RNSharePackage(),
new RNSentryPackage(),
new SnackbarPackage(),
......
rootProject.name = 'ThaliApp'
include ':react-native-gesture-handler'
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
include ':react-native-share'
project(':react-native-share').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-share/android')
include ':react-native-sentry'
......
......@@ -109,7 +109,7 @@ class Main extends Component {
return (
<I18nextProvider i18n={i18n}>
<Provider store={store}>
<NavigationService.AppNavigator
<NavigationService.AppContainer
ref={(navigatorRef) => {
NavigationService.setTopLevelNavigator(navigatorRef);
}}
......
......@@ -2,6 +2,7 @@ import {
createDrawerNavigator,
createStackNavigator,
createSwitchNavigator,
createAppContainer,
NavigationActions,
DrawerActions,
} from 'react-navigation';
......@@ -45,6 +46,8 @@ const AppNavigator = createSwitchNavigator({
SignedIn: SignedInNavigator,
});
const AppContainer = createAppContainer(AppNavigator);
let navigator;
function setTopLevelNavigator(navigatorRef) {
......@@ -73,7 +76,7 @@ function toggleDrawer() {
}
export default {
AppNavigator,
AppContainer,
navigate,
goBack,
toggleDrawer,
......
......@@ -9,6 +9,8 @@ target 'ThaliApp' do
pod 'Firebase/Core', '~> 5.20.1'
pod 'Firebase/Messaging', '~> 5.20.1'
pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
target 'ThaliAppTests' do
inherit! :search_paths
# Pods for testing
......
......@@ -31,7 +31,8 @@
".yarn/"
],
"setupFiles": [
"<rootDir>/__tests__/setup.js"
"<rootDir>/__tests__/setup.js",
"<rootDir>/node_modules/react-native-gesture-handler/jestSetup.js"
],
"testPathIgnorePatterns": [
"<rootDir>/__tests__/setup.js"
......@@ -40,7 +41,7 @@
"^.+\\.js$": "<rootDir>/jest/preprocessor.js"
},
"transformIgnorePatterns": [
"node_modules/(?!react-native|react-navigation|i18next-react-native-language-detector|react-navigation-drawer/)"
"node_modules/(?!react-native|@react-navigation|i18next-react-native-language-detector|react-navigation-drawer|react-navigation-stack/)"
],
"moduleNameMapper": {
"react-i18next": "<rootDir>/__mocks__/react-i18next-mock.js"
......@@ -59,14 +60,15 @@
"react-native": "0.59.8",
"react-native-dotenv": "0.2.0",
"react-native-firebase": "5.4.0",
"react-native-gesture-handler": "1.2.1",
"react-native-linear-gradient": "2.5.4",
"react-native-locale-detector": "1.0.1",
"react-native-render-html": "4.1.2",
"react-native-sentry": "0.43.1",
"react-native-share": "1.1.3",
"react-native-snackbar": "^0.5.5",
"react-native-snackbar": "0.5.5",
"react-native-vector-icons": "6.4.2",
"react-navigation": "2.18.3",
"react-navigation": "^3.11.0",
"react-redux": "5.1.1",
"redux": "4.0.1",
"redux-saga": "0.16.2"
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment