-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fix Issue #1608 - retry() failing in FirestorePagingAdapter #1609
Fix Issue #1608 - retry() failing in FirestorePagingAdapter #1609
Conversation
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.
Approve with one small change.
private final Observer<FirestoreDataSource> mDataSourceObserver = new Observer<FirestoreDataSource>() { | ||
@Override | ||
public void onChanged(@Nullable FirestoreDataSource source) { | ||
|
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.
Can we add a comment inside here explaining why we need an empty observer so that future people who read this code know?
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.
@samtstern yes.
What comment should be added ?
Please suggest me.
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.
//Observer to hold the value for FirestoreDataSource
??
Suggest me comment to write. |
I'd say something like: "LiveData created via Transformation do not have a
value until an Observer is attached. We attach this empty observer so that
our getValue() calls return non-null later."
…On Wed, Mar 27, 2019, 7:05 PM Shreyas Patil ***@***.***> wrote:
Suggest me comment to write.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1609 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIEw6og5i0mDCu5RIMI57yFVzlvQmQJSks5vbCOFgaJpZM4cOj8r>
.
|
Fine! |
@samtstern We should add this in |
@PatilShreyas yep that's fine with me. I'll wait to merge until those changes are made also |
Updated a comment for Observer.
I have fixed
retry()
failing and added a new methodrefresh()
to refresh the list from the beginning as issue #1608