Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Make seeking work (only when seeking ends)

ashilknc572fc171c38
diff --git a/mobile/lib/ui/viewer/file/video_widget_native.dart b/mobile/lib/ui/viewer/file/video_widget_native.dart
index 27937d59d1..cfbc75452d 100644
--- a/mobile/lib/ui/viewer/file/video_widget_native.dart
+++ b/mobile/lib/ui/viewer/file/video_widget_native.dart
@@ -472,14 +472,14 @@ class _SeekBarState extends State<_SeekBar>
min: 0.0,
max: 1.0,
value: _animationController.value,
- onChanged: (value) {
- // setState(() {
-
- // });
- // widget.controller?.seekTo(value.toInt());
- },
+ onChanged: (value) {},
+ divisions: 4500,
onChangeEnd: (value) {
- // widget.onSeek(Duration(milliseconds: value.round()));
+ widget.controller.seekTo((value * widget.duration!).round());
+ _animationController.animateTo(
+ value,
+ duration: const Duration(microseconds: 0),
+ );
},
allowedInteraction: SliderInteraction.tapAndSlide,
),