Skip to content

Commit

Permalink
- ensure dirs flag is properly updated
Browse files Browse the repository at this point in the history
  - FIX #1012
  • Loading branch information
mikepenz committed Sep 14, 2021
1 parent 6882dfe commit e7c48cd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import androidx.recyclerview.widget.ItemTouchHelper
internal fun ISwipeable.getSwipeDirs(dirs: Int): Int {
var directions = dirs
if (!isDirectionSupported(ItemTouchHelper.LEFT)) {
directions = dirs and ItemTouchHelper.LEFT.inv()
directions = directions and ItemTouchHelper.LEFT.inv()
}
if (!isDirectionSupported(ItemTouchHelper.RIGHT)) {
directions = dirs and ItemTouchHelper.RIGHT.inv()
directions = directions and ItemTouchHelper.RIGHT.inv()
}
return directions
}

0 comments on commit e7c48cd

Please sign in to comment.