Skip to content

Commit b752775

Browse files
committed
BackNavigationHandler: Delete, as handled naturally.
Some notable commits in the history of this logic: 0688b9b Handle Android hardware back button press. (#1125) 6785245 Improve and fix Back button on Android ef99027 navigation: Split AppWithNavigation Nothing suggests that we've been trying to do anything more complicated than the following default behavior of React Navigation (in the assumed absence of react-navigation-redux-helpers, which we removed in a recent commit) [1]: """ By default, when user presses the Android hardware back button, react-navigation will pop a screen or exit the app if there are no screens to pop. This is a sensible default behavior, but there are situations when you might want to implement custom handling. """ Logic like what we remove here was probably necessary when using react-navigation-redux-helpers; that package gives an example [2] that looks suspiciously similar to what we've been using. So, to be safe, we don't remove until here, after we've definitely stopped using r-n-r-h. [1] https://reactnavigation.org/docs/4.x/custom-android-back-button-handling/ [2] https://github.com/react-navigation/redux-helpers#back-button
1 parent f1b30f6 commit b752775

File tree

2 files changed

+6
-42
lines changed

2 files changed

+6
-42
lines changed

src/ZulipMobile.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import ThemeProvider from './boot/ThemeProvider';
99
import CompatibilityChecker from './boot/CompatibilityChecker';
1010
import AppEventHandlers from './boot/AppEventHandlers';
1111
import AppDataFetcher from './boot/AppDataFetcher';
12-
import BackNavigationHandler from './nav/BackNavigationHandler';
1312
import InitialNavigationDispatcher from './nav/InitialNavigationDispatcher';
1413
import AppContainer from './nav/AppContainer';
1514
import NavigationService from './nav/NavigationService';
@@ -30,14 +29,12 @@ export default (): React$Node => (
3029
<TranslationProvider>
3130
<ThemeProvider>
3231
<InitialNavigationDispatcher>
33-
<BackNavigationHandler>
34-
<AppContainer
35-
// `static navigationOptions` and `static router` not
36-
// being handled properly
37-
// $FlowFixMe
38-
ref={NavigationService.appContainerRef}
39-
/>
40-
</BackNavigationHandler>
32+
<AppContainer
33+
// `static navigationOptions` and `static router` not
34+
// being handled properly
35+
// $FlowFixMe
36+
ref={NavigationService.appContainerRef}
37+
/>
4138
</InitialNavigationDispatcher>
4239
</ThemeProvider>
4340
</TranslationProvider>

src/nav/BackNavigationHandler.js

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)