π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Include onThisDay in widget api
laurenspriem6ff6594a8196
diff --git a/mobile/lib/services/memories_cache_service.dart b/mobile/lib/services/memories_cache_service.dartindex 47ae3ae9f2..83c44bc798 100644--- a/mobile/lib/services/memories_cache_service.dart+++ b/mobile/lib/services/memories_cache_service.dart@@ -346,20 +346,30 @@ class MemoriesCacheService {}Future<List<SmartMemory>> getMemoriesForWidget({+ required bool onThisDay,required bool pastYears,required bool smart,}) async {- if (!pastYears && !smart) {+ if (!onThisDay && !pastYears && !smart) {+ _logger.info(+ 'No memories requested, returning empty list',+ );return [];}final allMemories = await getMemories();- if (pastYears && smart) {+ if (onThisDay && pastYears && smart) {return allMemories;}final filteredMemories = <SmartMemory>[];for (final memory in allMemories) {- if (!pastYears && memory.type == MemoryType.filler) continue;- if (!smart && memory.type != MemoryType.filler) continue;+ if (!memory.shouldShowNow()) continue;+ if (memory.type == MemoryType.onThisDay) {+ if (!onThisDay) continue;+ } else if (memory.type == MemoryType.filler) {+ if (!pastYears) continue;+ } else {+ if (!smart) continue;+ }filteredMemories.add(memory);}return filteredMemories;