fix a scroll bug (#165)

This commit is contained in:
Zhiting Guo 2022-07-31 20:01:23 +08:00 committed by GitHub
parent 8b6dee4e80
commit 8be8877174
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ fun LazyListState.isScrollDown(): Boolean {
if (isScrollInProgress) { if (isScrollInProgress) {
isScrollDown = when { isScrollDown = when {
firstVisibleItemIndex > preItemIndex -> true firstVisibleItemIndex > preItemIndex -> true
firstVisibleItemScrollOffset < preItemIndex -> false firstVisibleItemIndex < preItemIndex -> false
else -> firstVisibleItemScrollOffset > preScrollStartOffset else -> firstVisibleItemScrollOffset > preScrollStartOffset
} }
} else { } else {