optimize the UI action when user pull up after a pull down operation

Well, there is only little changes. but my IDE reformat the code, so it looks like a lot.