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

Dispatcher javadoc now addresses bootstrapping #236

Merged
merged 1 commit into from
Apr 14, 2017
Merged

Conversation

rjrjr
Copy link
Collaborator

@rjrjr rjrjr commented Apr 13, 2017

In response to confusion expressed in #173

@rjrjr rjrjr requested a review from loganj April 13, 2017 18:45
Copy link
Collaborator

@loganj loganj left a comment

Choose a reason for hiding this comment

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

Javadoc might be a little too specific/exclusive, would generalize the advice a bit.

* <p>
* Because of this bootstrapping behavior, Dispatchers are required to be idempotent. They
* should compare the {@link Flow#getKey(android.view.View) key of the current view(s)} to those
* in {@link Traversal#destination} before making visible updates. If no update is needed,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd add some general advice about checking whether the app is already in the correct state for the incoming key (including the getKey check) before making any state changes.

It's possible that an app author might have other state to check/update.

@rjrjr
Copy link
Collaborator Author

rjrjr commented Apr 13, 2017

PTAL

In response to confusion expressed in #173
@rjrjr rjrjr merged commit 4c6bec5 into master Apr 14, 2017
@rjrjr rjrjr deleted the ray/boostrap-doc-173 branch April 14, 2017 16:29
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