Skip to content

Cleanup #470

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

Merged
merged 9 commits into from
Jan 3, 2017
Merged

Cleanup #470

merged 9 commits into from
Jan 3, 2017

Conversation

SUPERCILEX
Copy link
Collaborator

This is an optional-ish PR (not that my other PRs were required! 😄) that has been waiting for #447.

I've noticed that most people (including @samtstern in his email refactor) put their static factory methods at the top of classes and Intellij keeps reformatting my code in that way so I thought I'd create a PR to fix that.

This PR looks big, but it's mostly just moving stuff around and letting Intellij do its thing.

Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
@NonNull
private final GoogleApiClientTaskHelper mClientHelper;

private CredentialsApiHelper(GoogleApiClientTaskHelper gacHelper) {
mClientHelper = gacHelper;
}

public CredentialRequest createCredentialRequest(List<IdpConfig> providers) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the only non move stuff around change: a few of these methods weren't being used so I removed them.

Signed-off-by: Alex Saveau <[email protected]>
# Conflicts:
#	auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailFragment.java
# Conflicts:
#	auth/src/main/java/com/firebase/ui/auth/ui/email/fieldvalidators/RequiredFieldValidator.java
} else {
mListener.onExistingIdpUser(new User.Builder(email)
.setProvider(providers.get(0))
.addOnCompleteListener(getActivity(),
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: the formatting between this complete listener and the success listener that follows is inconsistent. I prefer any style that minimizes indentation which means I vote for either the style before this change or the success listener style below.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

}
}

private void showEmailAutoCompleteHint() {
try {
startIntentSenderForResult(getEmailHintIntent().getIntentSender(), RC_HINT, null, 0, 0, 0, null);
startIntentSenderForResult(getEmailHintIntent().getIntentSender(),
RC_HINT,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we don't do this (argument alignment) throughout the project, any reason to start with this method?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nope, we should have been using mFragmentHelper.startIntentSenderForResult anyway to get rid of all those zeros and nulls.

@samtstern
Copy link
Contributor

Just a comment or two about style (which I only bothered to do since this PR is mostly about style in the first place)

Signed-off-by: Alex Saveau <[email protected]>
@samtstern samtstern merged commit 7415825 into firebase:version-1.1.0-dev Jan 3, 2017
@SUPERCILEX SUPERCILEX deleted the cleanup branch January 3, 2017 23:00
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.

2 participants