π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Improve
Manav Rathi572b1c4f6392
diff --git a/web/packages/new/photos/components/gallery/reducer.ts b/web/packages/new/photos/components/gallery/reducer.tsindex 64da6c1efd..646251f4a3 100644--- a/web/packages/new/photos/components/gallery/reducer.ts+++ b/web/packages/new/photos/components/gallery/reducer.ts@@ -531,7 +531,6 @@ const createCollectionSummaries = (const filesByCollection = groupFilesByCollectionID(files);const coverFiles = findCoverFiles(collections, filesByCollection);- const collectionFilesCount = getCollectionsFileCount(files);let hasUncategorizedCollection = false;for (const collection of collections) {@@ -587,12 +586,13 @@ const createCollectionSummaries = (CollectionSummaryItemName = collection.name;}+ const collectionFiles = filesByCollection.get(collection.id);collectionSummaries.set(collection.id, {id: collection.id,name: CollectionSummaryItemName,- latestFile: filesByCollection.get(collection.id)?.[0],+ latestFile: collectionFiles?.[0],coverFile: coverFiles.get(collection.id),- fileCount: collectionFilesCount.get(collection.id) ?? 0,+ fileCount: collectionFiles?.length ?? 0,updationTime: collection.updationTime,type: type,// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition@@ -793,15 +793,6 @@ function getAllSectionSummary(};}-function getCollectionsFileCount(files: EnteFile[]): Map<number, number> {- const collectionIDToFileMap = groupFilesByCollectionID(files);- const collectionFilesCount = new Map<number, number>();- for (const [id, files] of collectionIDToFileMap) {- collectionFilesCount.set(id, files.length);- }- return collectionFilesCount;-}-function getAllSectionVisibleFiles(files: EnteFile[],archivedCollections: Set<number>,