diff --git a/app/androidApp/src/main/kotlin/com/example/aiapp/TranscriptScroll.kt b/app/androidApp/src/main/kotlin/com/example/aiapp/TranscriptScroll.kt index 2e281e0..7888c39 100644 --- a/app/androidApp/src/main/kotlin/com/example/aiapp/TranscriptScroll.kt +++ b/app/androidApp/src/main/kotlin/com/example/aiapp/TranscriptScroll.kt @@ -262,7 +262,10 @@ fun TranscriptColumn( .fillMaxWidth() // Once for the whole list, not once per row: this is where a saved position is put // back, and by placement the scroll container's own measurements describe this layout. - .onPlaced { state.placed() } + // Only while there is a position waiting to be put back. `onPlaced` is the one hook + // here that would otherwise run on every frame, and it has nothing to do on all but + // the two frames of a restore. + .then(if (state.settling) Modifier.onPlaced { state.placed() } else Modifier) // One gesture detector for the whole list; see [TranscriptScroll.tappedHigh]. On the // initial pass and consuming nothing, so every control inside still gets the gesture // exactly as it would have.