Skip to content

armgit / ente

Public Imported from GitHub
0

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

Handle deselection on swipe gesture start

ashilkncbfe078a0700
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 a5bad48f8d..46dd9530b1 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
@@ -45,8 +45,12 @@ class SwipeToSelectHelper {
// If we're in selecting mode, immediately select the starting file
// But skip if it's a DummyFile (dummies are not selectable)
- if (_selecting == true && file is! DummyFile) {
- selectedFiles.selectAll({file});
+ if (file is! DummyFile) {
+ if (_selecting == true) {
+ selectedFiles.selectAll({file});
+ } else {
+ selectedFiles.unSelectAll({file});
+ }
}
}