Skip to content

High performance self-hosted photo and video management solution.

fix(mobile): scrubbing mode on scroll to date event (#22390)

Mert3bcb4b7af7b9
diff --git a/mobile/lib/presentation/widgets/timeline/timeline.widget.dart b/mobile/lib/presentation/widgets/timeline/timeline.widget.dart
index c38116c64e..83e679b8c1 100644
--- a/mobile/lib/presentation/widgets/timeline/timeline.widget.dart
+++ b/mobile/lib/presentation/widgets/timeline/timeline.widget.dart
@@ -212,11 +212,14 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> {
if (fallbackSegment != null) {
// Scroll to the segment with a small offset to show the header
final targetOffset = fallbackSegment.startOffset - 50;
- _scrollController.animateTo(
- targetOffset.clamp(0.0, _scrollController.position.maxScrollExtent),
- duration: const Duration(milliseconds: 500),
- curve: Curves.easeInOut,
- );
+ ref.read(timelineStateProvider.notifier).setScrubbing(true);
+ _scrollController
+ .animateTo(
+ targetOffset.clamp(0.0, _scrollController.position.maxScrollExtent),
+ duration: const Duration(milliseconds: 500),
+ curve: Curves.easeInOut,
+ )
+ .whenComplete(() => ref.read(timelineStateProvider.notifier).setScrubbing(false));
}
});
}