π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob] Minor improvements for ml sync
Neeraj Gupta2b147c1a87de
diff --git a/mobile/lib/models/ml/face/face.dart b/mobile/lib/models/ml/face/face.dartindex 2aeeb7aff3..75c3549c41 100644--- a/mobile/lib/models/ml/face/face.dart+++ b/mobile/lib/models/ml/face/face.dart@@ -98,7 +98,7 @@ class Face {faceID,fileID,parseAsDoubleList(json['embedding'] as List),- json['score'] as double,+ parseIntOrDoubleAsDouble(json['score'])!,Detection.fromJson(json['detection'] as Map<String, dynamic>),// high value means tparseIntOrDoubleAsDouble(json['blur']) ?? kLapacianDefault,diff --git a/mobile/lib/services/machine_learning/face_ml/person/person_service.dart b/mobile/lib/services/machine_learning/face_ml/person/person_service.dartindex da46b4b62a..31ccb54960 100644--- a/mobile/lib/services/machine_learning/face_ml/person/person_service.dart+++ b/mobile/lib/services/machine_learning/face_ml/person/person_service.dart@@ -113,13 +113,12 @@ class PersonService {PersonData personData,Map<String, Set<String>> dbPersonCluster,) {- bool result = false;if ((personData.assigned?.length ?? 0) != dbPersonCluster.length) {log("Person ${personData.name} has ${personData.assigned?.length} clusters, but ${dbPersonCluster.length} clusters found in DB",name: "PersonService",);- result = true;+ return true;} else {for (ClusterInfo info in personData.assigned!) {final dbCluster = dbPersonCluster[info.id];@@ -128,15 +127,14 @@ class PersonService {"Cluster ${info.id} not found in DB for person ${personData.name}",name: "PersonService",);- result = true;- continue;+ return true;}if (info.faces.length != dbCluster.length) {log("Cluster ${info.id} has ${info.faces.length} faces, but ${dbCluster.length} faces found in DB",name: "PersonService",);- result = true;+ return true;}for (var faceId in info.faces) {if (!dbCluster.contains(faceId)) {@@ -144,12 +142,12 @@ class PersonService {"Face $faceId not found in cluster ${info.id} for person ${personData.name}",name: "PersonService",);- result = true;+ return true;}}}}- return result;+ return false;}Future<PersonEntity> addPerson(