Skip to content

WIP: A very WIP upgrade to React Navigation v3 #3502

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ dependencies {
implementation project(':react-native-sound')
implementation project(':react-native-device-info')
implementation project(':react-native-vector-icons')
implementation project(':react-native-gesture-handler')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
Expand Down
13 changes: 13 additions & 0 deletions android/app/src/main/java/com/zulipmobile/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
import android.os.Bundle;
import android.webkit.WebView;
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 {

Expand All @@ -23,6 +26,16 @@ protected void onCreate(Bundle savedInstanceState) {
WebView.setWebContentsDebuggingEnabled(true);
}

@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new ReactActivityDelegate(this, getMainComponentName()) {
@Override
protected ReactRootView createRootView() {
return new RNGestureHandlerEnabledRootView(MainActivity.this);
}
};
}

@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import com.reactnative.photoview.PhotoViewPackage;
import com.reactnativecommunity.webview.RNCWebViewPackage;
import com.remobile.toast.RCTToastPackage;
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
import com.zmxv.RNSound.RNSoundPackage;
import io.sentry.RNSentryPackage;
import java.util.Arrays;
Expand All @@ -40,6 +41,7 @@ protected List<ReactPackage> getPackages() {
new RNCWebViewPackage(),
new RNTextInputResetPackage(),
new ImagePickerPackage(),
new RNGestureHandlerPackage(),
new OrientationPackage(),
new RNSentryPackage(MainApplication.this),
new PhotoViewPackage(),
Expand Down
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ project(':react-native-device-info').projectDir = new File(rootProject.projectDi
include ':app'
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':react-native-gesture-handler'
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
11 changes: 9 additions & 2 deletions flow-typed/npm/react-navigation-redux-helpers_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 2b6bd8cbbe1a407b5c4cd26dcfb4fa00
// flow-typed version: <<STUB>>/react-navigation-redux-helpers_v^1.1.1/flow_v0.78.0
// flow-typed signature: b384a698eb5597eec585ee5ff06a615c
// flow-typed version: <<STUB>>/react-navigation-redux-helpers_v^2.0.9/flow_v0.78.0

/**
* This is an autogenerated libdef stub for:
Expand Down Expand Up @@ -34,6 +34,10 @@ declare module 'react-navigation-redux-helpers/src/reducer' {
declare module.exports: any;
}

declare module 'react-navigation-redux-helpers/src/reduxify-navigator' {
declare module.exports: any;
}

declare module 'react-navigation-redux-helpers/src/types' {
declare module.exports: any;
}
Expand All @@ -48,6 +52,9 @@ declare module 'react-navigation-redux-helpers/src/middleware.js' {
declare module 'react-navigation-redux-helpers/src/reducer.js' {
declare module.exports: $Exports<'react-navigation-redux-helpers/src/reducer'>;
}
declare module 'react-navigation-redux-helpers/src/reduxify-navigator.js' {
declare module.exports: $Exports<'react-navigation-redux-helpers/src/reduxify-navigator'>;
}
declare module 'react-navigation-redux-helpers/src/types.js' {
declare module.exports: $Exports<'react-navigation-redux-helpers/src/types'>;
}
Loading