Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enqueue goBack() calls, because they can come asynchronously. #240

Merged
merged 1 commit into from
Apr 14, 2017

Conversation

rjrjr
Copy link
Collaborator

@rjrjr rjrjr commented Apr 14, 2017

Without this, apps crash due to popping empty history if goBack()
is called while a transition is outstanding.

Fixes #195. See also discussion in #197.

@@ -315,13 +336,11 @@ private static History preserveEquivalentPrefix(History current, History propose

private enum TraversalState {
/** {@link PendingTraversal#execute} has not been called. */
ENQUEUED,
/**
ENQUEUED, /**
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wtf?

@rjrjr rjrjr force-pushed the ray/backin-it-up-here-boss-195 branch from 01812de to 0b1f4e1 Compare April 14, 2017 17:50
@rjrjr rjrjr requested a review from loganj April 14, 2017 18:02
@loganj
Copy link
Collaborator

loganj commented Apr 14, 2017

This has the nice side effect of doing what users will typically expect if they hammer the back button: they'll safely go back to the "first" screen of the app, without crashing or accidentally exiting the app. Then when things calm down, pressing back again will exit the app.

LG :shipit:

@rjrjr
Copy link
Collaborator Author

rjrjr commented Apr 14, 2017

I'm going to add one more test case before merging.

Without this, apps crash due to popping empty history if goBack()
is called while a transition is outstanding.

Fixes #195. See also discussion in #197.
@rjrjr rjrjr force-pushed the ray/backin-it-up-here-boss-195 branch from 0b1f4e1 to 8a9325b Compare April 14, 2017 19:35
@rjrjr rjrjr merged commit 8609f0c into master Apr 14, 2017
@rjrjr rjrjr deleted the ray/backin-it-up-here-boss-195 branch April 14, 2017 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants