Skip to content

armgit / ente

Public Imported from GitHub
0

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

Remove unnecessary firstFile variable in _createNewGroup

ashilknc85876dc4031
diff --git a/mobile/apps/photos/lib/models/gallery/gallery_groups.dart b/mobile/apps/photos/lib/models/gallery/gallery_groups.dart
index 2eac187ef1..a6824edb85 100644
--- a/mobile/apps/photos/lib/models/gallery/gallery_groups.dart
+++ b/mobile/apps/photos/lib/models/gallery/gallery_groups.dart
@@ -361,8 +361,7 @@ class GalleryGroups {
) {
final uuid = _uuid.v1();
- // Save original first and last files before adding dummies
- final firstFile = groupFiles.first;
+ // Save original last file before adding dummies to the end
final lastFile = groupFiles.last;
// Only add dummy files if swipe-to-select feature is enabled
@@ -389,7 +388,7 @@ class GalleryGroups {
_groupIdToFilesMap[uuid] = groupFiles;
_groupIdToGroupDataMap[uuid] = (
groupType: groupType,
- startCreationTime: firstFile.creationTime!,
+ startCreationTime: groupFiles.first.creationTime!,
endCreationTime: lastFile.creationTime!
);