Merge pull request #512 from esteemapp/bugfix/#451

Fixed #451
This commit is contained in:
uğur erdal 2019-01-25 17:29:51 +03:00 committed by GitHub
commit 144f7cda61

View File

@ -90,9 +90,13 @@ class ApplicationContainer extends Component {
}
_onBackPress = () => {
const { dispatch } = this.props;
const { dispatch, nav } = this.props;
if (nav && nav[0].index !== 0) {
dispatch(NavigationActions.back());
} else {
BackHandler.exitApp();
}
return true;
};
@ -283,6 +287,7 @@ const mapStateToProps = state => ({
notificationSettings: state.application.isNotificationOpen,
isLogingOut: state.application.isLogingOut,
isLoggedIn: state.application.isLoggedIn,
nav: state.nav.routes,
// Account
unreadActivityCount: state.account.currentAccount.unread_activity_count,