π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Fix suggestion result not updating
laurenspriem7b980d83c12e
diff --git a/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart b/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dartindex 70dbc104d4..c393535ee7 100644--- a/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart+++ b/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart@@ -274,20 +274,21 @@ class ClusterFeedbackService<T> {);// Get the biggest cluster, to be used for quick suggestion calculation- final List<ClusterInfo> clusters = person.data.assigned;+ final personClusters = await mlDataDB.getPersonClusterIDs(person.remoteID);+ final allClusterIdsToCountMap = (await mlDataDB.clusterIdToFaceCount());String biggestClusterID = '';int biggestClusterSize = 0;final otherPersonClusterIDs = <String>{};- for (final cluster in clusters) {- final clusterSize = cluster.faces.length;+ for (final clusterID in personClusters) {+ final clusterSize = allClusterIdsToCountMap[clusterID] ?? 0;if (clusterSize > biggestClusterSize) {if (biggestClusterSize > 0) {otherPersonClusterIDs.add(biggestClusterID);}- biggestClusterID = cluster.id;+ biggestClusterID = clusterID;biggestClusterSize = clusterSize;} else {- otherPersonClusterIDs.add(cluster.id);+ otherPersonClusterIDs.add(clusterID);}}@@ -296,7 +297,7 @@ class ClusterFeedbackService<T> {final foundSuggestions = await _getFastSuggestions(person,biggestClusterID,- 0.50,+ 0.60,extraIgnoredClusters: otherPersonClusterIDs,);