Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix removal of emptied clusters

laurenspriem6915c08006e7
diff --git a/mobile/apps/photos/lib/services/machine_learning/face_ml/person/person_service.dart b/mobile/apps/photos/lib/services/machine_learning/face_ml/person/person_service.dart
index cf8fbc562f..872acfc7b0 100644
--- a/mobile/apps/photos/lib/services/machine_learning/face_ml/person/person_service.dart
+++ b/mobile/apps/photos/lib/services/machine_learning/face_ml/person/person_service.dart
@@ -313,7 +313,7 @@ class PersonService {
// Safety check to make sure we haven't created an empty cluster now, if so delete it
for (final emptyClusterID in emptiedClusters) {
personData.assigned
- .removeWhere((element) => element.id != emptyClusterID);
+ .removeWhere((element) => element.id == emptyClusterID);
await faceMLDataDB.removeClusterToPerson(
personID: person.remoteID,
clusterID: emptyClusterID,