Skip to content

armgit / ente

Public Imported from GitHub
0

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

Remove redundant code

laurenspriem799b1b0d03e1
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.dart
index 690d798ab1..09cf6335a0 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
@@ -466,7 +466,6 @@ 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,14 +484,12 @@ class ClusterFeedbackService<T> {
personID: person.remoteID,
clusterID: clusterID,
);
- if (fireEvent) {
- Bus.instance.fire(
- PeopleChangedEvent(
- type: PeopleEventType.addedClusterToPerson,
- source: clusterID,
- ),
- );
- }
+ Bus.instance.fire(
+ PeopleChangedEvent(
+ type: PeopleEventType.addedClusterToPerson,
+ source: clusterID,
+ ),
+ );
}
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.dart
index 25664cef6d..38afe7a9b9 100644
--- a/mobile/lib/ui/viewer/actions/people_selection_action_widget.dart
+++ b/mobile/lib/ui/viewer/actions/people_selection_action_widget.dart
@@ -264,15 +264,8 @@ class _PeopleSelectionActionWidgetState
await ClusterFeedbackService.instance.addClusterToExistingPerson(
clusterID: clusterID,
person: person,
- fireEvent: true,
);
}
- // Bus.instance.fire(
- // PeopleChangedEvent(
- // type: PeopleEventType.addedClusterToPerson,
- // source: person.remoteID,
- // ),
- // );
widget.selectedPeople.clearAll();
} catch (e, s) {
_logger.severe('Merging clusters failed', e, s);