mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
fix: show thumbnail instantly when jumping to top of the page (#22163)
* fix: show thumbnail instantly when jumping to top of the page * pr feedback
This commit is contained in:
parent
532ec10d5f
commit
28e9892ed3
1 changed files with 5 additions and 1 deletions
|
|
@ -129,7 +129,11 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> {
|
||||||
void _onEvent(Event event) {
|
void _onEvent(Event event) {
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case ScrollToTopEvent():
|
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:
|
case ScrollToDateEvent scrollToDateEvent:
|
||||||
_scrollToDate(scrollToDateEvent.date);
|
_scrollToDate(scrollToDateEvent.date);
|
||||||
case TimelineReloadEvent():
|
case TimelineReloadEvent():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue