More logging for birthday notification redirect
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user