π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mobile][photos] re-compute timelines for clusters when removing faces/files from them in memory lane service
Priyanshu Dangare1c1b79a7fa30
diff --git a/mobile/apps/photos/lib/services/memory_lane/memory_lane_service.dart b/mobile/apps/photos/lib/services/memory_lane/memory_lane_service.dartindex ae410cf2a9..d3adb20249 100644--- a/mobile/apps/photos/lib/services/memory_lane/memory_lane_service.dart+++ b/mobile/apps/photos/lib/services/memory_lane/memory_lane_service.dart@@ -320,11 +320,25 @@ class MemoryLaneService {return;}unawaited(_cleanupAssignedClusterTimelines(event));+ if (event.type == PeopleEventType.removedFilesFromCluster ||+ event.type == PeopleEventType.removedFaceFromCluster) {+ unawaited(_processClusterChange(event));+ return;+ }if (event.type != PeopleEventType.syncDone) {unawaited(_processPeopleChange(event));}}+ Future<void> _processClusterChange(PeopleChangedEvent event) async {+ final clusterID = event.source;+ if (clusterID.isEmpty) return;+ final timeline = await _cacheService.getTimeline(clusterID);+ if (timeline == null) return;+ if (!timeline.isCluster) return;+ schedulePersonRecompute(clusterID, isCluster: true, force: true);+ }+Future<void> _processPeopleChange(PeopleChangedEvent event) async {final person = event.person;if (person == null) {