mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-13 17:51:57 +00:00
Fix OutOfBounds in Array on CheckListAdapter. Closes #221
This commit is contained in:
parent
27fcaa4d16
commit
f709a129b4
1 changed files with 4 additions and 2 deletions
|
|
@ -63,8 +63,10 @@ public class CheckListAdapter extends RecyclerView.Adapter<CheckListAdapter.Item
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onItemDismiss(int position) {
|
public void onItemDismiss(int position) {
|
||||||
mItems.remove(position);
|
if(position != -1 && position > 0 && !mItems.isEmpty()){
|
||||||
notifyItemRemoved(position);
|
mItems.remove(position);
|
||||||
|
notifyItemRemoved(position);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue