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

ISwipeable - merge bug #1012

Closed
MFlisar opened this issue Sep 13, 2021 · 0 comments · Fixed by #1013
Closed

ISwipeable - merge bug #1012

MFlisar opened this issue Sep 13, 2021 · 0 comments · Fixed by #1013
Labels

Comments

@MFlisar
Copy link
Contributor

MFlisar commented Sep 13, 2021

internal fun ISwipeable.getSwipeDirs(dirs: Int): Int {
var directions = dirs
if (!isDirectionSupported(ItemTouchHelper.LEFT)) {
directions = dirs and ItemTouchHelper.LEFT.inv()
}
if (!isDirectionSupported(ItemTouchHelper.RIGHT)) {
directions = dirs and ItemTouchHelper.RIGHT.inv()
}
return directions
}

In line 11 and 14 you need to write directions = directions ..., otherwise you may lose the removement of the first flag if both flags are removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants