From 1f3e319552ff870f88cb0f1d14e422bb43024668 Mon Sep 17 00:00:00 2001 From: Jay Date: Thu, 12 Nov 2026 16:52:51 -0500 Subject: [PATCH] list: let the swipe reveal stretch to three cell widths --- .../org/oxycblt/auxio/list/recycler/SwipeActionsCallback.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/list/recycler/SwipeActionsCallback.kt b/app/src/main/java/org/oxycblt/auxio/list/recycler/SwipeActionsCallback.kt index af14ea123..d2d1b5860 100644 --- a/app/src/main/java/org/oxycblt/auxio/list/recycler/SwipeActionsCallback.kt +++ b/app/src/main/java/org/oxycblt/auxio/list/recycler/SwipeActionsCallback.kt @@ -165,15 +165,15 @@ class SwipeActionsCallback( /** * Map a raw drag to its visual translation: one-to-one up to [reveal], then increasing - * resistance asymptotic to twice the reveal, so the row can be pulled past the cell but - * fights back more the further it goes. + * resistance asymptotic to three times the reveal, so the row can be pulled well past the + * cell but fights back more the further it goes. */ private fun rubberBand(dX: Float, reveal: Float): Float { val past = abs(dX) - reveal if (past <= 0f) { return dX } - return sign(dX) * (reveal + past / (1f + past / reveal)) + return sign(dX) * (reveal + past / (1f + past / (2f * reveal))) } /** The square underlay cell's width: a standard large touchable size. */