Fix transcripts jumping when close to bottom (#7985)

This commit is contained in:
Hans-Peter Lehmann 2025-09-12 22:31:00 +02:00 committed by GitHub
parent 428d1901b4
commit 88e57cfb47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -213,6 +213,10 @@ public class TranscriptDialogFragment extends DialogFragment
doInitialScroll = false; doInitialScroll = false;
boolean quickScroll = Math.abs(layoutManager.findFirstVisibleItemPosition() - pos) > 5; boolean quickScroll = Math.abs(layoutManager.findFirstVisibleItemPosition() - pos) > 5;
if (layoutManager.findFirstVisibleItemPosition() < pos - 1
&& !viewBinding.transcriptList.canScrollVertically(1)) {
return;
}
if (quickScroll) { if (quickScroll) {
viewBinding.transcriptList.scrollToPosition(pos - 1); viewBinding.transcriptList.scrollToPosition(pos - 1);
// Additionally, smooth scroll, so that currently active segment is on top of screen // Additionally, smooth scroll, so that currently active segment is on top of screen