Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob] Rename

Neeraj Guptae95aae589cbd
diff --git a/mobile/lib/services/machine_learning/face_ml/face_recognition_service.dart b/mobile/lib/services/machine_learning/face_ml/face_recognition_service.dart
index b92c395062..3c6fb49de2 100644
--- a/mobile/lib/services/machine_learning/face_ml/face_recognition_service.dart
+++ b/mobile/lib/services/machine_learning/face_ml/face_recognition_service.dart
@@ -28,7 +28,7 @@ class FaceRecognitionService {
bool get isInitialized => _isInitialized;
- bool _shouldSyncPeople = false;
+ bool _shouldReconcilePeople = false;
bool _isSyncing = false;
Future<void> init() async {
@@ -45,7 +45,7 @@ class FaceRecognitionService {
// Listen on PeopleChanged
Bus.instance.on<PeopleChangedEvent>().listen((event) {
if (event.type == PeopleEventType.syncDone) return;
- _shouldSyncPeople = true;
+ _shouldReconcilePeople = true;
});
_isInitialized = true;
@@ -61,11 +61,12 @@ class FaceRecognitionService {
return;
}
_isSyncing = true;
- await entityService.syncEntity(EntityType.cgroup);
- if (_shouldSyncPeople) {
+ if (_shouldReconcilePeople) {
await PersonService.instance.reconcileClusters();
Bus.instance.fire(PeopleChangedEvent(type: PeopleEventType.syncDone));
- _shouldSyncPeople = false;
+ _shouldReconcilePeople = false;
+ } else {
+ await entityService.syncEntity(EntityType.cgroup);
}
_isSyncing = false;
}