fix(android): collapse onPostScroll branches (detekt ReturnCount)
android / Build + lint + test (push) Has been cancelled
android / Build + lint + test (push) Has been cancelled
This commit is contained in:
@@ -193,16 +193,17 @@ private fun rememberDragDismissConnection(
|
||||
source: NestedScrollSource,
|
||||
): Offset {
|
||||
if (source != NestedScrollSource.UserInput) return Offset.Zero
|
||||
if (available.y > 0f) {
|
||||
return if (available.y > 0f) {
|
||||
accumulated += available.y
|
||||
if (accumulated >= thresholdPx) {
|
||||
accumulated = 0f
|
||||
onDismiss()
|
||||
}
|
||||
return Offset(0f, available.y)
|
||||
Offset(0f, available.y)
|
||||
} else {
|
||||
if (consumed.y != 0f || available.y < 0f) accumulated = 0f
|
||||
Offset.Zero
|
||||
}
|
||||
if (consumed.y != 0f || available.y < 0f) accumulated = 0f
|
||||
return Offset.Zero
|
||||
}
|
||||
|
||||
override suspend fun onPreFling(available: Velocity): Velocity {
|
||||
|
||||
Reference in New Issue
Block a user