Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mobile][photos] Fix starting file not being selected in swipe gesture

ashilknafb6765b2c6c
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/swipe_to_select_helper.dart b/mobile/apps/photos/lib/ui/viewer/gallery/swipe_to_select_helper.dart
index 39ea291fec..d54984d478 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/swipe_to_select_helper.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/swipe_to_select_helper.dart
@@ -38,6 +38,11 @@ class SwipeToSelectHelper {
_lastToIndex = index;
// Use forced mode if provided, otherwise determine based on initial file's selection state
_selecting = forceSelecting ?? !selectedFiles.isFileSelected(file);
+
+ // If we're in selecting mode, immediately select the starting file
+ if (_selecting == true) {
+ selectedFiles.selectAll({file});
+ }
}
/// Update selection as the pointer moves to a new file