π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Make base locations more robust
laurenspriemc43212511388
diff --git a/mobile/lib/services/smart_memories_service.dart b/mobile/lib/services/smart_memories_service.dartindex 2d5d5b4230..d162a06e3a 100644--- a/mobile/lib/services/smart_memories_service.dart+++ b/mobile/lib/services/smart_memories_service.dart@@ -583,6 +583,14 @@ class SmartMemoriesService {}// Check for a minimum average number of days photos are clicked in rangeif (uniqueDays.length < daysRange * 0.1) continue;+ // Check that there isn't a huge time gap somewhere in the range+ final int gapThreshold = (daysRange * 0.6).round() * microSecondsInDay;+ int maxGap = 0;+ for (int i = 1; i < creationTimes.length; i++) {+ final gap = creationTimes[i] - creationTimes[i - 1];+ if (gap > maxGap) maxGap = gap;+ }+ if (maxGap > gapThreshold) continue;// Check if it's a current or old base locationfinal bool isCurrent = lastCreationTime.isAfter(DateTime.now().subtract(