From 7d31af9eb0a955e17ac80f1702b70105202e0271 Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 25 May 2023 10:57:05 +0930 Subject: [PATCH] Fix isScrolledToBottom (#1217) --- .../main/java/org/session/libsession/utilities/ViewUtils.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libsession/src/main/java/org/session/libsession/utilities/ViewUtils.kt b/libsession/src/main/java/org/session/libsession/utilities/ViewUtils.kt index f67abe8ec4..ea4932d05c 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/ViewUtils.kt +++ b/libsession/src/main/java/org/session/libsession/utilities/ViewUtils.kt @@ -17,7 +17,4 @@ fun Context.getColorFromAttr( } val RecyclerView.isScrolledToBottom: Boolean - get() { - val contentHeight = height - (paddingTop + paddingBottom) - return computeVerticalScrollRange() == computeVerticalScrollOffset() + contentHeight - } + get() = computeVerticalScrollOffset() + computeVerticalScrollExtent() >= computeVerticalScrollRange()