π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mobile][photos] Fix first file not getting selected in swipe-to-select
ashilkneb52989a6e01
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/component/gallery_file_widget.dart b/mobile/apps/photos/lib/ui/viewer/gallery/component/gallery_file_widget.dartindex 46dbd28d87..c5fe147e62 100644--- a/mobile/apps/photos/lib/ui/viewer/gallery/component/gallery_file_widget.dart+++ b/mobile/apps/photos/lib/ui/viewer/gallery/component/gallery_file_widget.dart@@ -94,6 +94,17 @@ class _GalleryFileWidgetState extends State<GalleryFileWidget> {_currentPointerId = event.pointer;// Don't start selection immediately - wait for horizontal swipe detection},+ onHover: (event) {+ // Only handle the initial file selection when swipe becomes active+ if (swipeActiveNotifier?.value == true &&+ swipeHelper != null &&+ !swipeHelper.isActive &&+ widget.selectedFiles != null &&+ widget.selectedFiles!.files.isNotEmpty) {+ // Start selection for the first file when horizontal swipe is detected+ swipeHelper.startSelection(widget.file);+ }+ },onEnter: (event) {// Check if horizontal swipe is active before starting or updating selectionif (swipeActiveNotifier?.value == true && swipeHelper != null) {diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/gallery.dart b/mobile/apps/photos/lib/ui/viewer/gallery/gallery.dartindex 26c7e6f74e..efbc0530a7 100644--- a/mobile/apps/photos/lib/ui/viewer/gallery/gallery.dart+++ b/mobile/apps/photos/lib/ui/viewer/gallery/gallery.dart@@ -293,7 +293,6 @@ class GalleryState extends State<Gallery> {});widget.selectedFiles?.addListener(_selectedFilesListener);-}@override@@ -470,7 +469,6 @@ class GalleryState extends State<Gallery> {}}-Future<FileLoadResult> _loadFiles({int? limit}) async {_logger.info("Loading ${limit ?? "all"} files");try {