1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-03-29 21:21:15 +02:00

Revert "ReactNativeClient: A better NAV_BACK logic to change folder or tag. (#984)" (Was opening up side menu on first app startup)

This reverts commit fc8f53fd0e290f3aa62dfdc7050033b9c29574fd.
This commit is contained in:
Laurent Cozic 2018-12-07 00:45:18 +01:00
parent bb45d72a56
commit 7d0def30f0

View File

@ -222,15 +222,12 @@ const appReducer = (state = appDefaultState, action) => {
}
}
if (action.routeName == 'Welcome') navHistory = [];
//reg.logger().info('Route: ' + currentRouteName + ' => ' + action.routeName);
newState = Object.assign({}, state);
if (action.routeName == 'Welcome') {
navHistory = [];
newState.showSideMenu = true;
}
if ('noteId' in action) {
newState.selectedNoteIds = action.noteId ? [action.noteId] : [];
}
@ -601,20 +598,12 @@ class AppComponent extends React.Component {
if (this.props.showSideMenu) {
this.props.dispatch({ type: 'SIDE_MENU_CLOSE' });
if (this.props.historyCanGoBack) {
return true;
} else {
BackHandler.exitApp();
return false;
}
return true;
}
if (this.props.historyCanGoBack) {
this.props.dispatch({ type: 'NAV_BACK' });
return true;
} else if (!this.props.showSideMenu) {
this.props.dispatch({ type: 'SIDE_MENU_OPEN' });
return true;
}
BackHandler.exitApp();