Skip to content

Commit

Permalink
优化细节
Browse files Browse the repository at this point in the history
  • Loading branch information
jenly1314 committed Jun 10, 2024
1 parent 44dfb66 commit 7bd2d73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Binary file modified app/release/app-release.apk
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.compose.ui.input.nestedscroll.NestedScrollSource
import androidx.compose.ui.unit.Velocity
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
import kotlin.math.absoluteValue

/**
* 主要用于处理和协调Header或Footer与内容多个元素之间的滚动事件。
Expand Down Expand Up @@ -55,7 +56,7 @@ internal class UltraSwipeRefreshNestedScrollConnection(
}

private fun onScroll(available: Offset): Offset {
if (available.y != 0f) {
if (available.y.absoluteValue > 0.5f) {

if (state.indicatorOffset <= 0f && available.y < 0f && !loadMoreEnabled) {
return Offset.Zero
Expand Down

0 comments on commit 7bd2d73

Please sign in to comment.