Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mobile][photos] Restore constant-time select-all check

r4khul4d336563950e
diff --git a/mobile/apps/photos/lib/ui/viewer/actions/file_selection_overlay_bar.dart b/mobile/apps/photos/lib/ui/viewer/actions/file_selection_overlay_bar.dart
index 0d49a10e65..683d96ad8e 100644
--- a/mobile/apps/photos/lib/ui/viewer/actions/file_selection_overlay_bar.dart
+++ b/mobile/apps/photos/lib/ui/viewer/actions/file_selection_overlay_bar.dart
@@ -264,8 +264,7 @@ class SelectAllButton extends StatelessWidget {
).galleryFilesOrNull;
if (allGalleryFiles == null) return const SizedBox.shrink();
final allSelected =
- allGalleryFiles.isNotEmpty &&
- allGalleryFiles.every(selectionState.selectedFiles.files.contains);
+ selectionState.selectedFiles.files.length == allGalleryFiles.length;
return SelectionControlChip(
label: context.strings.selectAllShort,
semanticLabel: context.strings.selectAll,