π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Fire event only once
laurenspriemf22a065c1562
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 fcd5155fc9..b0fdd460ed 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@@ -467,6 +467,7 @@ class ClusterFeedbackService<T> {Future<void> addClusterToExistingPerson({required PersonEntity person,required String clusterID,+ bool fireEvent = true,}) async {if (person.data.rejectedFaceIDs.isNotEmpty) {final clusterFaceIDs = await mlDataDB.getFaceIDsForCluster(clusterID);@@ -485,12 +486,14 @@ class ClusterFeedbackService<T> {personID: person.remoteID,clusterID: clusterID,);- Bus.instance.fire(- PeopleChangedEvent(- type: PeopleEventType.addedClusterToPerson,- source: person.remoteID,- ),- );+ if (fireEvent) {+ Bus.instance.fire(+ PeopleChangedEvent(+ type: PeopleEventType.addedClusterToPerson,+ source: person.remoteID,+ ),+ );+ }}Future<void> ignoreCluster(String clusterID) async {diff --git a/mobile/lib/ui/viewer/actions/people_selection_action_widget.dart b/mobile/lib/ui/viewer/actions/people_selection_action_widget.dartindex 8249b61296..42ee6ebb25 100644--- a/mobile/lib/ui/viewer/actions/people_selection_action_widget.dart+++ b/mobile/lib/ui/viewer/actions/people_selection_action_widget.dart@@ -261,9 +261,15 @@ class _PeopleSelectionActionWidgetStateawait ClusterFeedbackService.instance.addClusterToExistingPerson(clusterID: clusterID,person: person,+ fireEvent: false,);}- Bus.instance.fire(PeopleChangedEvent());+ Bus.instance.fire(+ PeopleChangedEvent(+ type: PeopleEventType.addedClusterToPerson,+ source: person.remoteID,+ ),+ );widget.selectedPeople.clearAll();} catch (e, s) {_logger.severe('Merging clusters failed', e, s);