From 8be88771745dc891cdd1d9229ad668e86dd9532e Mon Sep 17 00:00:00 2001 From: Zhiting Guo <35057824+frearb@users.noreply.github.com> Date: Sun, 31 Jul 2022 20:01:23 +0800 Subject: [PATCH] fix a scroll bug (#165) --- app/src/main/java/me/ash/reader/ui/ext/LazyListStateExt.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/me/ash/reader/ui/ext/LazyListStateExt.kt b/app/src/main/java/me/ash/reader/ui/ext/LazyListStateExt.kt index dccea7c..0ea5db1 100644 --- a/app/src/main/java/me/ash/reader/ui/ext/LazyListStateExt.kt +++ b/app/src/main/java/me/ash/reader/ui/ext/LazyListStateExt.kt @@ -45,7 +45,7 @@ fun LazyListState.isScrollDown(): Boolean { if (isScrollInProgress) { isScrollDown = when { firstVisibleItemIndex > preItemIndex -> true - firstVisibleItemScrollOffset < preItemIndex -> false + firstVisibleItemIndex < preItemIndex -> false else -> firstVisibleItemScrollOffset > preScrollStartOffset } } else {