Updated swipe handler.