From a7b5f3caf7377449367b200f76759ff7aee6d87d Mon Sep 17 00:00:00 2001 From: Rayen Sbai Date: Sun, 22 Nov 2026 22:34:32 +0100 Subject: [PATCH 1/2] fix(android): let a newer scrollToOffset win over a waiting scrollToIndex A scrollToIndex onto React rows waits up to a second for those rows to render. A scrollToOffset sent during that wait scrolled at once and left the jump queued, so scrollToIndex(300) followed by scrollToOffset(1500) ended at row 300 instead of row 23. scrollToOffset now drops the waiting jump first, as a newer scrollToIndex and a drag already do. --- android/src/main/java/me/sectiontn/flume/FlumeView.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/android/src/main/java/me/sectiontn/flume/FlumeView.kt b/android/src/main/java/me/sectiontn/flume/FlumeView.kt index 67ea2bb..1f8ed2c 100644 --- a/android/src/main/java/me/sectiontn/flume/FlumeView.kt +++ b/android/src/main/java/me/sectiontn/flume/FlumeView.kt @@ -556,6 +556,7 @@ class FlumeView(context: Context) : FrameLayout(context) { fun scrollToOffset(offsetDp: Double, animated: Boolean) { viewability.interacted = true recycler.stopScroll() + jumps.cancel()?.let { dropJump(it) } val targetPx = (offsetDp * density).roundToInt() ScrollTargets.startRow(targetPx)?.let { row -> scrollToPosition(row, animated, 0f, 0.0) From d35cfe0643b3eb6e77340a2c76f7e8e701d26c9a Mon Sep 17 00:00:00 2001 From: Rayen Sbai Date: Sun, 22 Nov 2026 23:02:40 +0100 Subject: [PATCH 2/2] fix(android): stop an earlier jump's realign from undoing a scrollToOffset A scrollToIndex onto a React row with viewPosition 0.5 or 1 keeps correcting the list for a few frames until its rows measure. A scrollToOffset sent in those frames scrolled away, and the next correction put the list back: scrollToIndex({ index: 5, viewPosition: 0.5 }) and two frames later scrollToOffset({ offset: 1500 }) ended on row 5. scrollToOffset now clears that correction first, before stopScroll can run it. --- android/src/main/java/me/sectiontn/flume/FlumeView.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/me/sectiontn/flume/FlumeView.kt b/android/src/main/java/me/sectiontn/flume/FlumeView.kt index 1f8ed2c..efa3f51 100644 --- a/android/src/main/java/me/sectiontn/flume/FlumeView.kt +++ b/android/src/main/java/me/sectiontn/flume/FlumeView.kt @@ -555,8 +555,10 @@ class FlumeView(context: Context) : FrameLayout(context) { // Offsets count from the content start; the visual delta flips for an inverted list. fun scrollToOffset(offsetDp: Double, animated: Boolean) { viewability.interacted = true - recycler.stopScroll() + // Before stopScroll, whose idle state would run an older command's realign. + pendingAlign = null jumps.cancel()?.let { dropJump(it) } + recycler.stopScroll() val targetPx = (offsetDp * density).roundToInt() ScrollTargets.startRow(targetPx)?.let { row -> scrollToPosition(row, animated, 0f, 0.0)