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

Feature - Realtime Database Pagination #1603

Merged
merged 5 commits into from Mar 26, 2019

Conversation

@PatilShreyas
Copy link
Contributor

PatilShreyas commented Mar 20, 2019

Here, I have implemented FirebaseRecyclerPagingAdapter that supports Pagination of Firebase Database with RecyclerView as issue #1601

Implementation of Paging for Firebase Database
@PatilShreyas PatilShreyas requested a review from samtstern as a code owner Mar 20, 2019
@PatilShreyas PatilShreyas changed the title Added support for Firebase Database Pagination as #1601 Feature - Support for Firebase Database Paging as #1601 Mar 20, 2019
@samtstern samtstern changed the title Feature - Support for Firebase Database Paging as #1601 Feature - Realtime Database Pagination Mar 21, 2019
Copy link
Member

samtstern left a comment

I did a first round of comments. In general this looks pretty good but I think we should make the logic almost exactly identical to the Firestore version, rather than having smaller differences througout.

See if you can go through each file, compare it to the Firestore version, and make them as similar as posisble.

.gitignore Outdated Show resolved Hide resolved
* managing our own thread pool or requiring the user to pass us an executor.
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public class FirebaseDataSource<T> extends PageKeyedDataSource<String, T> {

This comment has been minimized.

Copy link
@samtstern

samtstern Mar 21, 2019

Member

If you look at the Firestore implementation, we have the DataSource deal only in snapshots rather than putting in Class<T>. I think it's simpler that way and also I would like for this code to be as similar to the Firestore code as possible to enable future maintenance.

firestore/proguard-rules.pro Outdated Show resolved Hide resolved
@PatilShreyas

This comment has been minimized.

Copy link
Contributor Author

PatilShreyas commented Mar 22, 2019

Thank you @samtstern
I will make changes soon as you suggested.

Implemented exactly as Firestore version
@PatilShreyas

This comment has been minimized.

Copy link
Contributor Author

PatilShreyas commented Mar 22, 2019

@samtstern I have updated code as you suggested.
Issue #1601

@samtstern

This comment has been minimized.

Copy link
Member

samtstern commented Mar 22, 2019

@PatilShreyas on first glance this looks great! Thank you for such a well-formed PR. I will hopefully have time to do a final thorough review later today.

@PatilShreyas

This comment has been minimized.

Copy link
Contributor Author

PatilShreyas commented Mar 22, 2019

Thank You!

Fixed some code and minor changes.
Added functionalities :
1. retry() : Retry the loading of data in RecyclerView after failure.

2. refresh() : Reload data in RecyclerView by clearing recent loaded data.
Copy link
Member

samtstern left a comment

This looks 99% good! Some really small comments and then I am happy to merge this.

@PatilShreyas

This comment has been minimized.

Copy link
Contributor Author

PatilShreyas commented Mar 26, 2019

@samtstern I have fixed the code as your suggestions.

@samtstern

This comment has been minimized.

Copy link
Member

samtstern commented Mar 26, 2019

@PatilShreyas thanks for this! Here's my plan:

  • I am going to release version 4.3.2 today since it contains important bug fixes
  • Then I will create a new branch for version-4.4.0-dev
  • I'll merge your PR into that branch, and then we can put a few more things together and release 4.4.0
@PatilShreyas

This comment has been minimized.

Copy link
Contributor Author

PatilShreyas commented Mar 26, 2019

@samtstern Okay!
Thank You!

@samtstern samtstern changed the base branch from version-4.3.2-dev to version-4.4.0-dev Mar 26, 2019
@samtstern samtstern added this to the 4.4.0 milestone Mar 26, 2019
@samtstern samtstern merged commit d170531 into firebase:version-4.4.0-dev Mar 26, 2019
2 checks passed
2 checks passed
cla/google All necessary CLAs are signed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@PatilShreyas PatilShreyas deleted the PatilShreyas:version-4.3.2-dev branch Mar 26, 2019
@PatilShreyas PatilShreyas restored the PatilShreyas:version-4.3.2-dev branch Mar 26, 2019
@PatilShreyas PatilShreyas deleted the PatilShreyas:version-4.3.2-dev branch Mar 26, 2019
@PatilShreyas PatilShreyas restored the PatilShreyas:version-4.3.2-dev branch Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.