Skip to content

Commit b0901a1

Browse files
committed
fixed error in onClick remove mode
1 parent 8fc297c commit b0901a1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

library/src/com/mobeta/android/dslv/DragSortListView.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,8 +1347,6 @@ public void removeItem(int which ) {
13471347
public void removeItem(int which, float velocityX) {
13481348
if (mDragState == IDLE || mDragState == DRAGGING) {
13491349

1350-
mDragState = REMOVING;
1351-
mRemoveVelocityX = velocityX;
13521350
if (mDragState == IDLE) {
13531351
// called from outside drag-sort
13541352
mSrcPos = getHeaderViewsCount() + which;
@@ -1360,6 +1358,9 @@ public void removeItem(int which, float velocityX) {
13601358
v.setVisibility(View.INVISIBLE);
13611359
}
13621360
}
1361+
1362+
mDragState = REMOVING;
1363+
mRemoveVelocityX = velocityX;
13631364

13641365
if (mInTouchEvent) {
13651366
switch (mCancelMethod) {

0 commit comments

Comments
 (0)