Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

More logging for birthday notification redirect

laurenspriem1e63fe72cfb7
diff --git a/mobile/lib/services/memories_cache_service.dart b/mobile/lib/services/memories_cache_service.dart
index 37f5eebf03..4e0b88a9b7 100644
--- a/mobile/lib/services/memories_cache_service.dart
+++ b/mobile/lib/services/memories_cache_service.dart
@@ -527,19 +527,30 @@ class MemoriesCacheService {
if (allMemories.isEmpty) return;
final personMemories = <PeopleMemory>[];
for (final memory in allMemories) {
+ if (memory is PeopleMemory) {
+ _logger.info("Found person memory");
+ _logger.info("Person memory ID: ${memory.id}");
+ _logger.info("Person memory personID: ${memory.personID}");
+ _logger.info("Person memory isBirthday: ${memory.isBirthday}");
+ }
if (memory is PeopleMemory &&
(memory.isBirthday ?? false) &&
memory.personID == personID) {
personMemories.add(memory);
}
}
+ if (personMemories.isEmpty) {
+ _logger.severe("No person memories found");
+ }
PeopleMemory? personMemory;
for (final memory in personMemories) {
if (memory.peopleMemoryType == PeopleMemoryType.youAndThem) {
+ _logger.info("Found youAndThem person memory");
personMemory = memory;
break; // breaking to prefer youAndThem over spotlight
}
if (memory.peopleMemoryType == PeopleMemoryType.spotlight) {
+ _logger.info("Found spotlight person memory");
personMemory = memory;
}
}
@@ -562,6 +573,7 @@ class MemoriesCacheService {
forceCustomPageRoute: true,
);
}
+ _logger.info("Routing to the birthday memory");
await routeToPage(
context,
FullScreenMemoryDataUpdater(
diff --git a/mobile/lib/ui/tabs/home_widget.dart b/mobile/lib/ui/tabs/home_widget.dart
index b3779be225..c06f213ee2 100644
--- a/mobile/lib/ui/tabs/home_widget.dart
+++ b/mobile/lib/ui/tabs/home_widget.dart
@@ -881,13 +881,16 @@ class _HomeWidgetState extends State<HomeWidget> {
if (payload != null) {
debugPrint('notification payload: $payload');
if (payload.toLowerCase().contains("onthisday")) {
+ _logger.info("On this day notification received");
// ignore: unawaited_futures
memoriesCacheService.goToOnThisDayMemory(context);
} else if (payload.toLowerCase().contains("birthday")) {
+ _logger.info("Birthday notification received");
final personID = payload.substring("birthday_".length);
// ignore: unawaited_futures
memoriesCacheService.goToPersonMemory(context, personID);
} else {
+ _logger.info("Album notification received");
final collectionID = Uri.parse(payload).queryParameters["collectionID"];
if (collectionID != null) {
final collection = CollectionsService.instance
diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml
index 7cc26ae418..a5800f0156 100644
--- a/mobile/pubspec.yaml
+++ b/mobile/pubspec.yaml
@@ -12,7 +12,7 @@ description: ente photos application
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
-version: 1.1.0+1053
+version: 1.1.01+1054
publish_to: none
environment: