π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mobile][photos] fix issue where cluster memory lane schedule is not cached
Priyanshu Dangare6699a3d7e992
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 ae8449e86c..c69ef86d9d 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@@ -82,13 +82,6 @@ class MemoryLaneService {Bus.instance.on<MLConsentChangedEvent>().listen(_handleMlConsentChange);_scheduleStartupBackfill();_initialized = true;- if (flagService.internalUser) {- try {- await _scheduleTimelinesForMemoriesStrip();- } catch (e, s) {- _logger.severe("_scheduleTimelinesForMemoriesStrip failed:", e, s);- }- }await _queueFullRecompute();} catch (e, s) {_logger.severe("Initialization failed", e, s);@@ -115,13 +108,6 @@ class MemoryLaneService {return;}persons.addAll(await PersonService.instance.getPersons());- for (final person in persons) {- if (person.data.isIgnored) {- await _invalidateTimeline(person.remoteID);- continue;- }- schedulePersonRecompute(person.remoteID, force: force);- }}if (flagService.internalUser) {final assigned = <String>{};@@ -131,6 +117,24 @@ class MemoryLaneService {}}_topNClusters = await _mlDataDB.getClustersForMemoryLane(assigned);+ }+ if (flagService.internalUser) {+ try {+ await _scheduleTimelinesForMemoriesStrip();+ } catch (e, s) {+ _logger.severe("_scheduleTimelinesForMemoriesStrip failed:", e, s);+ }+ }+ if (!isLocalGalleryMode) {+ for (final person in persons) {+ if (person.data.isIgnored) {+ await _invalidateTimeline(person.remoteID);+ continue;+ }+ schedulePersonRecompute(person.remoteID, force: force);+ }+ }+ if (flagService.internalUser) {final cache = await _cacheService.getCache();final List<Future<void>> tasks = [];for (final timeline in cache.allTimelines) {