1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-09 23:17:29 +02:00

feat: memories in new timeline (#19720)

* feat: memories sliver

* memories lane

* display and show memory

* fix: get correct memories

* naming

* pr feedback

* use equalsValue for visibility

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
Alex
2025-07-04 13:49:15 -05:00
committed by GitHub
parent 181efb9010
commit 4a2cf28882
15 changed files with 958 additions and 74 deletions

View File

@@ -26,6 +26,8 @@ class Scrubber extends ConsumerStatefulWidget {
final double bottomPadding;
final double? monthSegmentSnappingOffset;
Scrubber({
super.key,
Key? scrollThumbKey,
@@ -33,6 +35,7 @@ class Scrubber extends ConsumerStatefulWidget {
required this.timelineHeight,
this.topPadding = 0,
this.bottomPadding = 0,
this.monthSegmentSnappingOffset,
required this.child,
}) : assert(child.scrollDirection == Axis.vertical);
@@ -296,7 +299,10 @@ class ScrubberState extends ConsumerState<Scrubber>
final viewportHeight = _scrollController.position.viewportDimension;
final targetScrollOffset = layoutSegment.startOffset;
final centeredOffset = targetScrollOffset - (viewportHeight / 4) + 100;
final centeredOffset = targetScrollOffset -
(viewportHeight / 4) +
100 +
(widget.monthSegmentSnappingOffset ?? 0.0);
_scrollController.jumpTo(centeredOffset.clamp(0.0, maxScrollExtent));
}