opened when I scroll out of window andback close itself
gmm932 opened this issue · comments
gmm932 commented
opened when I scroll out of window and back closed itself
pakudinov commented
Bug in SwipeItemMangerImpl.java at Single mode.
Produce:
- Open one item (item A).
- Fast open other item (item B). Item A will close automatically.
- Call notifyDataSetChanged()
Result:
Item B will lose open state.
Reason:
Item B may open earlier than item A will close.
So in line 189 item B will invalidate mOpenPosition var.
Fix:
Add if (mOpenPosition == position)
in line 188
public void onClose(SwipeLayout layout) { if (mode == Attributes.Mode.Multiple) { mOpenPositions.remove(position); } else if (mOpenPosition == position) { mOpenPosition = INVALID_POSITION; } }