bugfix: Fix trick play overflow (#186)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2024-12-23 11:43:34 +01:00 committed by GitHub
parent 0ae613a666
commit c845184c53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 8 deletions

View file

@ -268,10 +268,10 @@ class _ChapterProgressSliderState extends ConsumerState<VideoProgressBar> {
final chapter = (currentStream?.chapters ?? []).getChapterFromDuration(currentDuration);
final trickPlay = currentStream?.trickPlay;
final screenWidth = MediaQuery.of(context).size.width;
final calculatedPosition = _chapterPosition.clamp(-50, screenWidth - (chapterCardWidth + 45)).toDouble();
final calculatedPosition = _chapterPosition;
final offsetDifference = _chapterPosition - calculatedPosition;
return Positioned(
left: calculatedPosition,
left: calculatedPosition.clamp(-10, screenWidth - (chapterCardWidth + 45)),
child: IgnorePointer(
child: AnimatedOpacity(
opacity: visible ? 1 : 0,