mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00: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:
parent
181efb9010
commit
4a2cf28882
15 changed files with 958 additions and 74 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue