From f5fb57e2eb041801fc28e724ace7430015e296ee Mon Sep 17 00:00:00 2001 From: alexstyl <1665273+alexstyl@users.noreply.github.com> Date: Sat, 26 Oct 2024 19:00:22 +0700 Subject: [PATCH] Use UserInput over deprecated Drag --- core/src/commonMain/kotlin/ScrollArea.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/commonMain/kotlin/ScrollArea.kt b/core/src/commonMain/kotlin/ScrollArea.kt index 6b5f1f8..e4fdb54 100644 --- a/core/src/commonMain/kotlin/ScrollArea.kt +++ b/core/src/commonMain/kotlin/ScrollArea.kt @@ -101,7 +101,7 @@ fun ScrollArea( Box(modifier.nestedScroll(remember { object : NestedScrollConnection { override fun onPostScroll(consumed: Offset, available: Offset, source: NestedScrollSource): Offset { - if (source == NestedScrollSource.Drag && overscrollEffect != null) { + if (source == NestedScrollSource.UserInput && overscrollEffect != null) { // they are scrolling past a dead-end // forward to overscrollEffect's direction they are trying to go @@ -129,7 +129,7 @@ fun ScrollArea( scope.launch { scrollEvents.emit(Unit) } - if (source == NestedScrollSource.Drag && overscrollEffect != null) { + if (source == NestedScrollSource.UserInput && overscrollEffect != null) { // they have already started scrolling // forward to overscrollEffect's opposite direction they are trying to go