fix(android): support static reminder notifications and ensure channel exists

Static reminders scheduled via scheduleDailyNotification() with
isStaticReminder=true were being skipped because they don't have content
in storage - title/body are in Intent extras. Fixed by:

- DailyNotificationReceiver: Extract static reminder extras from Intent
  and pass to WorkManager as input data
- DailyNotificationWorker: Check for static reminder flag in input data
  and create NotificationContent from input data instead of loading from
  storage
- DailyNotificationWorker: Ensure notification channel exists before
  displaying (fixes "No Channel found" errors)

Also updated prefetch timing from 5 minutes to 2 minutes before notification
time in plugin code and web UI.
This commit is contained in:
Matthew Raymer
2025-11-18 04:02:56 +00:00
parent e16c55ac1d
commit 8f20da7e8d
5 changed files with 95 additions and 27 deletions

View File

@@ -432,8 +432,8 @@
scheduledTime.setDate(scheduledTime.getDate() + 1);
}
// Calculate prefetch time (5 minutes before notification)
const prefetchTime = new Date(scheduledTime.getTime() - 300000); // 5 minutes
// Calculate prefetch time (2 minutes before notification)
const prefetchTime = new Date(scheduledTime.getTime() - 120000); // 2 minutes
const prefetchTimeReadable = prefetchTime.toLocaleTimeString();
const notificationTimeReadable = scheduledTime.toLocaleTimeString();
const prefetchTimeString = prefetchTime.getHours().toString().padStart(2, '0') + ':' +