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

fixed the issue #1928 regarding onItemSwiped callback. #1929

Merged
merged 4 commits into from
Aug 13, 2018

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