diff --git a/mobile/lib/models/smart_memory.dart b/mobile/lib/models/smart_memory.dart index 980a25f216..999525f98e 100644 --- a/mobile/lib/models/smart_memory.dart +++ b/mobile/lib/models/smart_memory.dart @@ -2,6 +2,7 @@ import "package:photos/models/memory.dart"; const kMemoriesUpdateFrequency = Duration(days: 7); const kMemoriesMargin = Duration(days: 2); +const kDayItself = Duration(days: 1); enum MemoryType { people, diff --git a/mobile/lib/services/smart_memories_service.dart b/mobile/lib/services/smart_memories_service.dart index 4a00afbdbd..88179d4fcb 100644 --- a/mobile/lib/services/smart_memories_service.dart +++ b/mobile/lib/services/smart_memories_service.dart @@ -395,7 +395,7 @@ class SmartMemoriesService { title: secondTitle, firstDateToShow: thisBirthday.microsecondsSinceEpoch, lastDateToShow: thisBirthday - .add(const Duration(days: 1)) + .add(kDayItself) .microsecondsSinceEpoch, ), ); @@ -408,7 +408,7 @@ class SmartMemoriesService { .subtract(const Duration(days: 6)) .microsecondsSinceEpoch, lastDateToShow: thisBirthday - .add(const Duration(days: 1)) + .add(kDayItself) .microsecondsSinceEpoch, ), ); @@ -944,7 +944,7 @@ class SmartMemoriesService { photoSelection, "${DateFormat('MMMM d').format(date)} through the years", date.subtract(kMemoriesMargin).microsecondsSinceEpoch, - date.add(const Duration(days: 1)).microsecondsSinceEpoch, + date.add(kDayItself).microsecondsSinceEpoch, ), ); } else { @@ -970,7 +970,7 @@ class SmartMemoriesService { photoSelection, name, showDate.microsecondsSinceEpoch, - showDate.add(const Duration(days: 1)).microsecondsSinceEpoch, + showDate.add(kDayItself).microsecondsSinceEpoch, ), ); }