mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-22 13:48:55 +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
|
||||
public void onItemDismiss(int position) {
|
||||
mItems.remove(position);
|
||||
notifyItemRemoved(position);
|
||||
if(position != -1 && position > 0 && !mItems.isEmpty()){
|
||||
mItems.remove(position);
|
||||
notifyItemRemoved(position);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue