mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-03 16:03:06 +00:00
Tracks preloading begins once you've reached three-quarters of the list
This commit is contained in:
@@ -23,7 +23,7 @@ public abstract class PaginationScrollListener extends RecyclerView.OnScrollList
|
|||||||
int firstVisibleItemPosition = layoutManager.findFirstVisibleItemPosition();
|
int firstVisibleItemPosition = layoutManager.findFirstVisibleItemPosition();
|
||||||
|
|
||||||
if (!isLoading()) {
|
if (!isLoading()) {
|
||||||
if (firstVisibleItemPosition >= 0 && (visibleItemCount + firstVisibleItemPosition) >= totalItemCount) {
|
if (firstVisibleItemPosition >= 0 && (visibleItemCount + firstVisibleItemPosition) >= (totalItemCount / 4 * 3)) {
|
||||||
loadMoreItems();
|
loadMoreItems();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user