From 9f2b8894dfa283e715328966f013dd130c5a0f13 Mon Sep 17 00:00:00 2001 From: Jay Date: Thu, 12 Nov 2026 16:36:43 -0500 Subject: [PATCH] list: restore swipe recovery by dropping the payload rebind --- .../auxio/list/recycler/SwipeActionsCallback.kt | 10 +++------- 1 file changed, 3 insertions(+), 7 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 12846f84c..e1759abee 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 @@ -99,9 +99,9 @@ class SwipeActionsCallback( song, if (direction == ItemTouchHelper.END) SwipeAction.QUEUE else SwipeAction.PLAY_NEXT, ) - // The row stays: rebind it in place, cancelling the swipe-out animation. The payload - // keeps the item animator from cross-fading the row. - recyclerView.adapter?.notifyItemChanged(position, PAYLOAD_SWIPE_COMMIT) + // The row stays: rebind it in place; the full rebind also tells the touch helper to + // cancel the swipe-away animation and recover the row. + recyclerView.adapter?.notifyItemChanged(position) } /** @@ -214,8 +214,4 @@ class SwipeActionsCallback( icon.draw(c) } - private companion object { - /** Payload for the in-place rebind after a committed swipe; avoids the cross-fade. */ - val PAYLOAD_SWIPE_COMMIT = Any() - } }