Skip to content

Commit 76f347b

Browse files
Equipe Mobile MindPeterStaev
authored andcommitted
Bugfix android - loadMoreItems not is called (#27)
lastVisibleItemPos starts with 0, so item position to test should be items.length - 1.
1 parent 42946b4 commit 76f347b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

grid-view.android.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class GridViewScrollListener extends android.support.v7.widget.RecyclerView.OnSc
179179
}
180180

181181
const lastVisibleItemPos = (view.getLayoutManager() as android.support.v7.widget.GridLayoutManager).findLastCompletelyVisibleItemPosition();
182-
const itemCount = owner.items.length;
182+
const itemCount = owner.items.length - 1;
183183
if (lastVisibleItemPos === itemCount) {
184184
owner.notify({
185185
eventName: GridViewBase.loadMoreItemsEvent,

0 commit comments

Comments
 (0)