Skip to content

Commit

Permalink
Revert "Feature Hand Back Key for Android" (#835)
Browse files Browse the repository at this point in the history
  • Loading branch information
aksonov authored Jun 17, 2016
1 parent 5a9a7f7 commit 74dcd89
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
6 changes: 0 additions & 6 deletions src/Reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {

import { assert } from './Util';
import { getInitialState } from './State';
import { Platform } from 'react-native';

// WARN: it is not working correct. rewrite it.
function checkPropertiesEqual(action, lastAction) {
Expand Down Expand Up @@ -73,11 +72,6 @@ function inject(state, action, props, scenes) {
case POP_ACTION2:
case POP_ACTION: {
assert(!state.tabs, 'pop() operation cannot be run on tab bar (tabs=true)');

if (Platform.OS === 'android') {
assert(state.index > 0, 'You are already in the root scene.');
}

if (state.index === 0) {
return state;
}
Expand Down
10 changes: 0 additions & 10 deletions src/Router.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import React, {
Component,
PropTypes,
} from 'react';
import { BackAndroid } from 'react-native';
import NavigationExperimental from 'react-native-experimental-navigation';

import Actions from './Actions';
Expand Down Expand Up @@ -99,15 +98,6 @@ class Router extends Component {
render() {
if (!this.state.reducer) return null;

BackAndroid.addEventListener('hardwareBackPress', () => {
try {
Actions.pop();
return true;
} catch (err) {
return false;
}
});

return (
<NavigationRootContainer
reducer={this.state.reducer}
Expand Down

0 comments on commit 74dcd89

Please sign in to comment.