mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-03 11:40:44 +03:00
Fixed #451
This commit is contained in:
parent
0b5d43cf24
commit
830594d57b
@ -90,9 +90,13 @@ class ApplicationContainer extends Component {
|
||||
}
|
||||
|
||||
_onBackPress = () => {
|
||||
const { dispatch } = this.props;
|
||||
const { dispatch, nav } = this.props;
|
||||
|
||||
dispatch(NavigationActions.back());
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user