Skip to content

Handle on cancelled #282

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 14 commits into from
Sep 2, 2016
Merged

Handle on cancelled #282

merged 14 commits into from
Sep 2, 2016

Conversation

SUPERCILEX
Copy link
Collaborator

  • If this has been discussed in an issue, make sure to mention the issue number here. If not, go file an issue about this to make sure this is a desirable change.


@Override
public void onCancelled(DatabaseError databaseError) {
FirebaseRecyclerAdapter.this.onCancelled(databaseError);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you mean FirebaseListAdapter.this here, (rather than FirebaseRecyclerAdapter.this)

@samtstern
Copy link
Contributor

Thanks for this, I like this idea.

Not sure why the build failed, looks like a Travis issue to me. I can manually verify if it keeps doing that.

@puf
Copy link
Contributor

puf commented Sep 1, 2016

Thanks for the PR! I really appreciate it.

Both Sam and I left a few comments. Just respond if something is unclear or if you want to discuss further..

protected void notifyCancelledListeners(DatabaseError databaseError) {
if (mListener != null) {
mListener.onCancelled(databaseError);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this method is missing a closing bracket. TravisCI says:

/home/travis/build/firebase/FirebaseUI-Android/database/src/main/java/com/firebase/ui/database/FirebaseArray.java:121: error: reached end of file while parsing

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks!

@@ -95,19 +96,27 @@ public void onChildMoved(DataSnapshot snapshot, String previousChildKey) {
}

public void onCancelled(DatabaseError firebaseError) {
// TODO: what do we do with this?
notifyCancelledListeners(databaseError);
Copy link
Contributor

Choose a reason for hiding this comment

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

The symbol databaseError is not defined here, firebaseError is what you called the method argument.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks again! I'm working on another branch on my machine so I've been using the online file editor in Github. Yeah... It's tough without Intellij!

@samtstern
Copy link
Contributor

And we're green! Thanks for sticking through all of the comments, Merging this now, and I will release a 0.5.2 release soon that includes this change.

Thanks for your contribution.

@SUPERCILEX
Copy link
Collaborator Author

Finally!

@samtstern samtstern merged commit da37005 into firebase:master Sep 2, 2016
@samtstern
Copy link
Contributor

@SUPERCILEX by the way I used the 'squash and merge' option so you may need to update your fork for future work.

@SUPERCILEX SUPERCILEX deleted the handle-onCancelled branch September 2, 2016 00:16
@SUPERCILEX
Copy link
Collaborator Author

Thanks for the tip!

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.

3 participants