dynamically activate/deactivate the swipe