Refactor isMobile for touch devices