mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-05-10 05:09:35 +08:00
BackAndroid -> BackHandler
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import React from 'react';
|
||||
import invariant from './utils/invariant';
|
||||
import { BackAndroid, Linking } from './PlatformHelpers';
|
||||
import { BackHandler, Linking } from './PlatformHelpers';
|
||||
import NavigationActions from './NavigationActions';
|
||||
import addNavigationHelpers from './addNavigationHelpers';
|
||||
|
||||
@@ -154,7 +154,7 @@ export default function createNavigationContainer<T: *>(
|
||||
return;
|
||||
}
|
||||
|
||||
this.subs = BackAndroid.addEventListener('backPress', () =>
|
||||
this.subs = BackHandler.addEventListener('hardwareBackPress', () =>
|
||||
this.dispatch(NavigationActions.back())
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user