Skip to content

Commit

Permalink
Merge pull request liaohuqiu#50 from jw2013/fix-bug
Browse files Browse the repository at this point in the history
should check against scrollHeight on deciding scrollback
  • Loading branch information
liaohuqiu committed Feb 7, 2015
2 parents 7c98864 + c5d1c84 commit 965f153
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ptr-lib/src/in/srain/cube/views/ptr/PtrFrameLayout.java
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,9 @@ private void onRelease(boolean stayForLoading) {
if (mStatus == PTR_STATUS_LOADING) {
// keep header for fresh
if (mKeepHeaderWhenRefresh) {
int scrollHeight = mHeaderRetainHeightOnRefresh >= 0 ? mHeaderRetainHeightOnRefresh : mHeaderHeight;
// scroll header back
if (mCurrentPos > mHeaderHeight && !stayForLoading) {
int scrollHeight = mHeaderRetainHeightOnRefresh >= 0 ? mHeaderRetainHeightOnRefresh : mHeaderHeight;
if (mCurrentPos > scrollHeight && !stayForLoading) {
mScrollChecker.tryToScrollTo(scrollHeight, mDurationToClose);
} else {
// do nothing
Expand Down

0 comments on commit 965f153

Please sign in to comment.