Skip to content

Conversation

@humazed
Copy link
Contributor

@humazed humazed commented Jan 15, 2018

when using setOnItemSwipeListener#onItemSwiped as in sample application I noticed that onItemSwiped is called before the swiped item is deleted from the data list.

looking at library code it turns out the that in BaseItemDraggableAdapteronItemSwiped#onItemSwiped is called before remove mData.remove(pos);

which make the callback mostly useless if you want to make anything with the updated data.

I'm suggesting moving onItemSwiped at the end of the method.

I have tried it and every this seems to be working fine.
I have made a pull request containing my solution.

@humazed
Copy link
Contributor Author

humazed commented Jul 13, 2018

@AllenCoder please take a look. and tell me if there anything I can do to merge my pull request?

@AllenCoder AllenCoder merged commit 611cc13 into CymChad:master Aug 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants