-
-
Notifications
You must be signed in to change notification settings - Fork 323
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
Conversation
By analyzing the blame information on this pull request, we identified @wangmengyan95 and @grantland to be potential reviewers. |
@grantland updated the pull request. |
1 similar comment
@grantland updated the pull request. |
setPageOnQuery(page, query); | ||
private void loadNextPage(final boolean shouldClear) { | ||
if (shouldClear && pager != null) { | ||
cts.cancel(); |
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.
Since we set cts
to null
in clear()
, do we need null
checking for cts here?
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.
We don't, but you made me realized we need synchronized (lock)
here
@grantland updated the pull request. |
@Override | ||
public Task<List<T>> then(Task<List<T>> task) throws Exception { | ||
synchronized (lock) { | ||
loadNextPageTask = null; |
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.
Why we need to clear loadNextPageTask
here, does this prevent us from calling loadNextPageTask
multiple times?
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.
It's what we use to determine isLoadingNextPage()
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.
👍
A utility class to page through `ParseQuery` results
8504d1d
to
e9af63f
Compare
When will ParseQueryPager be available via |
@wangmengyan95 might be worthwhile to do a release at some point? |
A utility class to page through
ParseQuery
results