-
Notifications
You must be signed in to change notification settings - Fork 242
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
New way to break Flow.goBack() #264
Comments
So I'm guessing the problem is that it does a flow/flow/src/main/java/flow/Flow.java Lines 331 to 341 in 2982c5e
|
Have you figured out if my hunch was right or wrong? I mean, I haven't used Flow in a while. |
@dcow here how I solved the issue for me |
I have encountered an issue where the history size shrinks while a traversal is in-flight. This could happen any time you hold traversals while you're switching screens (perhaps for an animation) and mash the back button quickly. It appears the issue is noted:
8a9325b#diff-0351f5577272525804cf0292acb7fe1bR283
#195 #240
but I don't think the solution of simply noop-ing the traversal is entirely correct. When this happens, the dispatcher never gets to execute the next pending traversal. It may be a good idea to noop the traversal, but the dispatcher still needs to flush traversals so that the whole thing doesn't grind to a halt. Another option might be to continue dispatching the traversals but not pop the history if Flow notices the history has changed size.
A workaround is to not hold onto traversals, but that's not really what you want to do long term.
The text was updated successfully, but these errors were encountered: