mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-15 08:32:45 +03:00
commit
144f7cda61
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user