Skip to content

Commit

Permalink
Merge pull request #8 from VictorAlbertos/master
Browse files Browse the repository at this point in the history
Expose stillLoading in order to change its state from outside.
  • Loading branch information
miguelbcr authored Sep 7, 2016
2 parents 8dd62d2 + 70c4f38 commit accbfb8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ public void resetPager(Pager.Call<T> call) {
if (pager != null) pager.reset(call);
}

public void setStillLoadingPager(boolean stillLoading) {
this.pager.setStillLoading(stillLoading);
}

public interface LastItemListener {
void lastItemReached();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ private void showItems(Call<T> call, final boolean reset) {
});
}

void setStillLoading(boolean stillLoading) {
this.stillLoading = stillLoading;
}

private void nextPage(T item) {
if (allLoaded) {
adapter.removeMoreListener();
Expand Down

0 comments on commit accbfb8

Please sign in to comment.