compatible to pull to refresh and infinite scroll