Skip to content

Implement ParseQueryPager #129

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 1 commit into from
Feb 5, 2016
Merged

Implement ParseQueryPager #129

merged 1 commit into from
Feb 5, 2016

Conversation

grantland
Copy link
Contributor

A utility class to page through ParseQuery results

@facebook-github-bot
Copy link

By analyzing the blame information on this pull request, we identified @wangmengyan95 and @grantland to be potential reviewers.

@facebook-github-bot
Copy link

@grantland updated the pull request.

1 similar comment
@facebook-github-bot
Copy link

@grantland updated the pull request.

setPageOnQuery(page, query);
private void loadNextPage(final boolean shouldClear) {
if (shouldClear && pager != null) {
cts.cancel();
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we set cts to null in clear(), do we need null checking for cts here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't, but you made me realized we need synchronized (lock) here

@facebook-github-bot
Copy link

@grantland updated the pull request.

@Override
public Task<List<T>> then(Task<List<T>> task) throws Exception {
synchronized (lock) {
loadNextPageTask = null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we need to clear loadNextPageTask here, does this prevent us from calling loadNextPageTask multiple times?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's what we use to determine isLoadingNextPage()

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

A utility class to page through `ParseQuery` results
grantland added a commit that referenced this pull request Feb 5, 2016
@grantland grantland merged commit cf93cc7 into master Feb 5, 2016
@grantland grantland deleted the grantland.pager branch February 5, 2016 19:24
@ofuwape
Copy link

ofuwape commented Mar 10, 2016

When will ParseQueryPager be available via compile 'com.parse:parseui-widget-android:0.0.1' ?

@grantland
Copy link
Contributor Author

@wangmengyan95 might be worthwhile to do a release at some point?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants