Skip to content

High performance self-hosted photo and video management solution.

fix: show thumbnail instantly when jumping to top of the page (#22163)

Alex28e9892ed3b2
diff --git a/mobile/lib/presentation/widgets/timeline/timeline.widget.dart b/mobile/lib/presentation/widgets/timeline/timeline.widget.dart
index 141621dae3..19c3551e4a 100644
--- a/mobile/lib/presentation/widgets/timeline/timeline.widget.dart
+++ b/mobile/lib/presentation/widgets/timeline/timeline.widget.dart
@@ -129,7 +129,11 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> {
void _onEvent(Event event) {
switch (event) {
case ScrollToTopEvent():
- _scrollController.animateTo(0, duration: const Duration(milliseconds: 250), curve: Curves.easeInOut);
+ ref.read(timelineStateProvider.notifier).setScrubbing(true);
+ _scrollController
+ .animateTo(0, duration: const Duration(milliseconds: 250), curve: Curves.easeInOut)
+ .whenComplete(() => ref.read(timelineStateProvider.notifier).setScrubbing(false));
+
case ScrollToDateEvent scrollToDateEvent:
_scrollToDate(scrollToDateEvent.date);
case TimelineReloadEvent():