Merge pull request #28 from TouchInstinct/bugs/crash_fix

fix IndexOutOfBoundsException
This commit is contained in:
Gavriil 2016-08-13 22:23:41 +02:00 committed by GitHub
commit cd8d9a8c99
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ public abstract class ObservableCollectionAdapter<TItem, TViewHolder extends Obs
notifyItemRangeChanged(change.getStart() + itemsOffset(), change.getCount());
break;
case REMOVED:
if (getItemCount() == 0) {
if (getItemCount() - itemsOffset() == 0) {
//TODO: bug of recyclerview?
notifyDataSetChanged();
} else {