π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Cache boundaries provider to reduce lookups during pointer movement
ashilkne9e777760a6d
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/swipe_selection_wrapper.dart b/mobile/apps/photos/lib/ui/viewer/gallery/swipe_selection_wrapper.dartindex dbbb59c434..2a5c65b5c2 100644--- a/mobile/apps/photos/lib/ui/viewer/gallery/swipe_selection_wrapper.dart+++ b/mobile/apps/photos/lib/ui/viewer/gallery/swipe_selection_wrapper.dart@@ -77,6 +77,7 @@ class _SwipeSelectionWrapperState extends State<SwipeSelectionWrapper> {@overrideWidget build(BuildContext context) {+ final boundariesProvider = GalleryBoundariesProvider.of(context);// If swipe selection is not enabled, just return the child wrapped in GallerySwipeHelperif (!widget.isEnabled) {return GallerySwipeHelper(@@ -138,7 +139,7 @@ class _SwipeSelectionWrapperState extends State<SwipeSelectionWrapper> {// Check for auto-scroll if swipe is activeif (widget.swipeActiveNotifier.value) {- _checkAndHandleAutoScroll();+ _checkAndHandleAutoScroll(boundariesProvider);}},onPointerUp: (_) {@@ -209,8 +210,7 @@ class _SwipeSelectionWrapperState extends State<SwipeSelectionWrapper> {}/// Check if pointer is outside boundaries and start/stop auto-scroll- void _checkAndHandleAutoScroll() {- final provider = GalleryBoundariesProvider.of(context);+ void _checkAndHandleAutoScroll(GalleryBoundariesProvider? provider) {if (provider == null) return;final topBoundary = provider.topBoundaryNotifier.value;