From 544078a40cda24eefbc7793fe1cc36c1fa5dce26 Mon Sep 17 00:00:00 2001 From: laurenspriem Date: Thu, 5 Jun 2025 08:45:36 +0530 Subject: [PATCH] Optional notification message --- mobile/lib/services/memories_cache_service.dart | 3 +-- mobile/lib/services/notification_service.dart | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mobile/lib/services/memories_cache_service.dart b/mobile/lib/services/memories_cache_service.dart index 839a53cead..6f3534ec4f 100644 --- a/mobile/lib/services/memories_cache_service.dart +++ b/mobile/lib/services/memories_cache_service.dart @@ -308,7 +308,7 @@ class MemoriesCacheService { final s = await LanguageService.s; await NotificationService.instance.scheduleNotification( s.onThisDay, - s.lookBackOnYourMemories, + message: s.lookBackOnYourMemories, id: memory.id.hashCode, channelID: "onThisDay", channelName: s.onThisDay, @@ -376,7 +376,6 @@ class MemoriesCacheService { memory.personName != null ? "Happy birthday to ${memory.personName}! 🎉" : "Happy birthday! 🥳", - // TODO:lau (after mergin main): change `scheduleNotification` api to make message optional // TODO:lau (after mergin main): extract strings id: memory.id.hashCode, channelID: "birthday", diff --git a/mobile/lib/services/notification_service.dart b/mobile/lib/services/notification_service.dart index 23ec9eb12d..c315d3e410 100644 --- a/mobile/lib/services/notification_service.dart +++ b/mobile/lib/services/notification_service.dart @@ -143,8 +143,8 @@ class NotificationService { } Future scheduleNotification( - String title, - String message, { + String title, { + String? message, required int id, String channelID = "io.ente.photos", String channelName = "ente",