- Notifications
You must be signed in to change notification settings - Fork56
Prop for alerting the user before exiting app#167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
mention-bot commentedJan 28, 2017
nmquebb commentedFeb 3, 2017
? |
charpeni commentedFeb 16, 2017
Thank you@nmquebb, I'll review this soon. |
charpeni left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you for your contribution and sorry for the delay.
The back button will only exit the current application if it's the last route in the stack, it's the expected behaviour.
However, it could be nice to have this, but I would highly prefer a callback or something more customizable than a hardcoded alert that can't be translated.
| currentRoute:PropTypes.object.isRequired, | ||
| customAction:PropTypes.func, | ||
| handleBackAndroid:PropTypes.bool, | ||
| alertAndroidExit:PropTypes.bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
nit: alphabetical order
| this.goBack(); | ||
| returntrue; | ||
| }else{ | ||
| console.log('dsa') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Theseconsole.log should not be commited.
| customAction:PropTypes.func, | ||
| firstRoute:PropTypes.object.isRequired, | ||
| handleBackAndroid:PropTypes.bool, | ||
| alertAndroidExit:PropTypes.bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
nit: alphabetical order
I've been getting some complaints from user's about the app just exiting. I'm not an Android user so I don't know if that's expected behavior or not, but I thought it would be nice to add an option alert before leaving the app.