Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix

Manav Rathia0f103be9bdc
diff --git a/web/apps/photos/src/utils/photoFrame/index.ts b/web/apps/photos/src/utils/photoFrame/index.ts
index 4e185bdc1b..6965b535bf 100644
--- a/web/apps/photos/src/utils/photoFrame/index.ts
+++ b/web/apps/photos/src/utils/photoFrame/index.ts
@@ -86,15 +86,19 @@ export const handleSelectCreatorMulti =
if (checked) {
for (const file of files) {
- newSelected[file.id] = true;
- newCount++;
- if (file.ownerID === userID) newOwnCount++;
+ if (!newSelected[file.id]) {
+ newSelected[file.id] = true;
+ newCount++;
+ if (file.ownerID === userID) newOwnCount++;
+ }
}
} else {
for (const file of files) {
- newSelected[file.id] = false;
- newCount--;
- if (file.ownerID === userID) newOwnCount--;
+ if (newSelected[file.id]) {
+ newSelected[file.id] = false;
+ newCount--;
+ if (file.ownerID === userID) newOwnCount--;
+ }
}
}