Fix #502
This commit is contained in:
parent
7f3e026315
commit
0bae571974
1 changed files with 5 additions and 1 deletions
|
@ -168,8 +168,12 @@ public class NewsReaderDetailFragment extends Fragment {
|
||||||
adapter.ChangeReadStateOfItem(vh, true);
|
adapter.ChangeReadStateOfItem(vh, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Check if Listview is scrolled to bottom
|
//Check if Listview is scrolled to bottom
|
||||||
if (lastVisibleItem == (totalItemCount-1) && recyclerView.getChildAt(visibleItemCount).getBottom() <= recyclerView.getHeight()) {
|
if (lastVisibleItem == (totalItemCount-1) &&
|
||||||
|
visibleItemCount != 0 && //Check if list is empty
|
||||||
|
recyclerView.getChildAt(visibleItemCount).getBottom() <= recyclerView.getHeight()) {
|
||||||
for (int i = firstVisibleItem; i <= lastVisibleItem; i++) {
|
for (int i = firstVisibleItem; i <= lastVisibleItem; i++) {
|
||||||
RecyclerView.ViewHolder vhTemp = recyclerView.findViewHolderForLayoutPosition(i);
|
RecyclerView.ViewHolder vhTemp = recyclerView.findViewHolderForLayoutPosition(i);
|
||||||
if(vhTemp instanceof ViewHolder) { //Check for ViewHolder instance because of ProgressViewHolder
|
if(vhTemp instanceof ViewHolder) { //Check for ViewHolder instance because of ProgressViewHolder
|
||||||
|
|
Loading…
Reference in a new issue