Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setOnItemSwipeListener#onItemSwiped is called before the data is changed #1928

Closed
humazed opened this issue Jan 15, 2018 · 1 comment
Closed

Comments

@humazed
Copy link
Contributor

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 everything seems to be working fine.
I can make a pull request for it if you want.

humazed added a commit to humazed/BaseRecyclerViewAdapterHelper that referenced this issue Jan 15, 2018
@CymChad
Copy link
Owner

CymChad commented Jan 17, 2018

Thank you for your request

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

No branches or pull requests

2 participants