π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fixup! [mobile][photos] fix memories strip schedule validation
Priyanshu Dangare9ccc5ec9ebc4
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 83500b84bd..699c8a2808 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@@ -984,15 +984,10 @@ class MemoryLaneService {final valid = cache.memoriesStripSchedule.entries.where((entry) => !invalid.contains(entry.key)).toList();- final hasCurrentSchedule = valid.any((entry) {- final endShowingAt = entry.value.beginShowingAt + scheduleWindowMicros;- return entry.value.beginShowingAt <= nowMicros &&- nowMicros < endShowingAt;- });final alreadyScheduledAhead = valid.any((s) => s.value.beginShowingAt >= nowMicros + scheduleWindowMicros,);- if (hasCurrentSchedule && alreadyScheduledAhead) {+ if (alreadyScheduledAhead) {await _cacheService.updateMemoriesStripSchedule(invalid, null);return;}@@ -1011,15 +1006,10 @@ class MemoryLaneService {return;}- final int newBeginShowingAt;- if (hasCurrentSchedule) {- newBeginShowingAt = valid- .map((entry) => entry.value.beginShowingAt + scheduleWindowMicros)- .followedBy([nowMicros])- .max;- } else {- newBeginShowingAt = nowMicros;- }+ final newBeginShowingAt = valid+ .map((entry) => entry.value.beginShowingAt + scheduleWindowMicros)+ .followedBy([nowMicros])+ .max;await _cacheService.updateMemoriesStripSchedule(invalid,MemoryLaneSchedule(