Skip to content

Commit

Permalink
Merge pull request #76 from Omega-R/develop
Browse files Browse the repository at this point in the history
Fix pagination issue
  • Loading branch information
anton-knyazev authored Aug 9, 2018
2 parents 21eefc7 + afbfc83 commit 958e2c4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void getItemOffsets(Rect outRect, View view, RecyclerView recyclerView, R
int itemCount = recyclerView.getAdapter().getItemCount();
// RecyclerView.Adapter getItemCount gives count of values + 1 (PaginationViewHolder)
int preventionPosition = itemCount - mCallback.getPagePreventionForEnd() - 1;
if (adapterPosition >= preventionPosition && itemCount > mLastItemCount && preventionPosition > 0) {
if (adapterPosition >= preventionPosition && itemCount > mLastItemCount) {
mCurrentPage++;
recyclerView.post(new Runnable() {
@Override
Expand Down

0 comments on commit 958e2c4

Please sign in to comment.