Merge pull request #28 from TouchInstinct/bugs/crash_fix
fix IndexOutOfBoundsException
This commit is contained in:
commit
cd8d9a8c99
|
|
@ -197,7 +197,7 @@ public abstract class ObservableCollectionAdapter<TItem, TViewHolder extends Obs
|
||||||
notifyItemRangeChanged(change.getStart() + itemsOffset(), change.getCount());
|
notifyItemRangeChanged(change.getStart() + itemsOffset(), change.getCount());
|
||||||
break;
|
break;
|
||||||
case REMOVED:
|
case REMOVED:
|
||||||
if (getItemCount() == 0) {
|
if (getItemCount() - itemsOffset() == 0) {
|
||||||
//TODO: bug of recyclerview?
|
//TODO: bug of recyclerview?
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue