Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Allow deselecting capped picker date groups

r4khul4e2f70c1c8b6
diff --git a/mobile/apps/photos/lib/ui/device_picker/device_picker_selection.dart b/mobile/apps/photos/lib/ui/device_picker/device_picker_selection.dart
index 3dcc07ed69..77a429dfe3 100644
--- a/mobile/apps/photos/lib/ui/device_picker/device_picker_selection.dart
+++ b/mobile/apps/photos/lib/ui/device_picker/device_picker_selection.dart
@@ -33,6 +33,17 @@ class DevicePickerSelectedFiles extends SelectedFiles {
}
}
+ @override
+ void toggleGroupSelection(Set<EnteFile> filesToToggle) {
+ if (locked) return;
+ if (files.length == maxPickAssetLimit &&
+ filesToToggle.any(isFileSelected)) {
+ unSelectAll(filesToToggle);
+ } else {
+ super.toggleGroupSelection(filesToToggle);
+ }
+ }
+
@override
void selectAll(Set<EnteFile> filesToSelect) {
if (locked) return;