-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Handle on cancelled #282
Conversation
SUPERCILEX
commented
Sep 1, 2016
- 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.
- Issue Handle onCancelled in FirebaseArray #71
|
||
@Override | ||
public void onCancelled(DatabaseError databaseError) { | ||
FirebaseRecyclerAdapter.this.onCancelled(databaseError); |
There was a problem hiding this comment.
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
)
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. |
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); | ||
} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
And we're green! Thanks for sticking through all of the comments, Merging this now, and I will release a Thanks for your contribution. |
Finally! |
@SUPERCILEX by the way I used the 'squash and merge' option so you may need to update your fork for future work. |
Thanks for the tip! |