Skip to content

armgit / ente

Public Imported from GitHub
0

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

Clarify gallery grouping covariance comment

ashilkn96e77ee7569a
diff --git a/mobile/apps/photos/lib/models/gallery/gallery_groups.dart b/mobile/apps/photos/lib/models/gallery/gallery_groups.dart
index 2871f4a573..fd4c9b60b3 100644
--- a/mobile/apps/photos/lib/models/gallery/gallery_groups.dart
+++ b/mobile/apps/photos/lib/models/gallery/gallery_groups.dart
@@ -336,8 +336,8 @@ class GalleryGroups {
}
List<EnteFile> _copyFilesInRange(int start, int end) {
- // sublist preserves a covariant source list's runtime element type, which
- // can reject DummyFile placeholders added by _createNewGroup.
+ // Create a real List<EnteFile> so _createNewGroup can add DummyFiles.
+ // A sublist of List<EnteTrashFile>, for example, only accepts EnteTrashFile.
return List<EnteFile>.from(allFiles.getRange(start, end));
}