the previous implemention has some assumption which is not always …#3
the previous implemention has some assumption which is not always …#3whmbuaa wants to merge 1 commit intosteveliles:masterfrom
Conversation
…true.
the previous implemention has a pre-condition:
1. ActivityA->ActivityB
2. press back
2.1 ActivityA.onStart
2.1 ActivityB.onStop
otherwize, the behavior will be wrong.
unfornautely, this assumption is not always true.
So I make a new version.
Please review and give your comments.
Thanks!
|
First of all, thanks for taking the time to submit a pull request! - I'm fully prepared to believe it doesn't work in all cases - unfortunately I never had time to test it thoroughly. I've enjoyed reading your version and thinking about the problem again :) I like the use of a stack to track the activity backstack, and your version is certainly simpler and cleaner without the non-deterministic I can't spot anything in the existing implementation that makes the assumption you described, since it only ever compares against the most recently started activity ... am I missing something? I guess you have encountered situations where the current implementation fails and your version works ... can you provide a quick description of those? Is this related to issue #4, or is it just a coincidence that that issue was opened within minutes of your pull request? The change of API (removing Binding in favour of removeListener) probably needs a major version bump. Might be safer to keep the Binding but mark its usage as deprecated. |
…true.
the previous implemention assumes below is true:
2.1 ActivityA.onStart
2.1 ActivityB.onStop
otherwize, the behavior will be wrong.
unfornautely, this assumption is not always true.
So I make a new version.
Please review and give your comments.
Thanks!