소스 검색

Fix PTR extra offset calculation (#10172)

Ivan Iskandar 1 년 전
부모
커밋
356fc5b524
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      presentation-core/src/main/java/tachiyomi/presentation/core/components/material/PullRefresh.kt

+ 1 - 1
presentation-core/src/main/java/tachiyomi/presentation/core/components/material/PullRefresh.kt

@@ -196,7 +196,7 @@ private class PullToRefreshStateImpl(
             val newOffset = (distancePulled + available.y).coerceAtLeast(0f)
             val dragConsumed = newOffset - distancePulled
             distancePulled = newOffset
-            verticalOffset = calculateVerticalOffset() + (extraVerticalOffset * progress)
+            verticalOffset = calculateVerticalOffset() + (extraVerticalOffset * progress.coerceIn(0f, 1f))
             dragConsumed
         }
         return Offset(0f, y)