Merge pull request #224 from HabitRPG/checklist-adapter-out-of-bounds

Fix OutOfBounds in Array on CheckListAdapter. Closes #221
This commit is contained in:
negue 2015-12-13 16:06:18 +01:00
commit f250e87c98

View file

@ -63,8 +63,10 @@ public class CheckListAdapter extends RecyclerView.Adapter<CheckListAdapter.Item
@Override
public void onItemDismiss(int position) {
mItems.remove(position);
notifyItemRemoved(position);
if(position >= 0 && position < mItems.size()){
mItems.remove(position);
notifyItemRemoved(position);
}
}