Fix: Android daily notification: single schedule on edit, no double-cancel

Resolves long-standing issue where the second scheduled time (after editing
the reminder) did not fire on Android.

- PushNotificationPermission: add open(..., options?: { skipSchedule }).
  When skipSchedule is true (edit flow), dialog only invokes callback with
  time/message; parent is sole scheduler so the plugin is not called twice.
- AccountViewView: pass { skipSchedule: true } when opening the dialog for
  edit; keep cancel (iOS only) + single scheduleDailyNotification in callback.
- NativeNotificationService: serialize scheduleDailyNotification so only one
  schedule runs at a time (scheduleLock + doScheduleDailyNotification).
- AccountViewView: guard edit-reminder callback with editReminderScheduleInProgress
  so one schedule per user action.
- Gate pre-cancel on Android in edit flow (CONSUMING_APP brief): skip
  cancelDailyNotification before schedule on Android; plugin cancels internally.
- Use single stable reminder id and always pass id on both platforms (plugin 1.1.2+).
- Add doc/plugin-android-edit-reschedule-alarm-not-firing.md for plugin repo
  (cancel-before-reschedule may cancel the PendingIntent used for setAlarmClock).
This commit is contained in:
Jose Olarte III
2026-02-16 21:25:07 +08:00
parent dc3f12d53b
commit 0e096b1a46
6 changed files with 197 additions and 10 deletions

8
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "timesafari",
"version": "1.1.6-beta",
"version": "1.2.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "timesafari",
"version": "1.1.6-beta",
"version": "1.2.0",
"dependencies": {
"@capacitor-community/electron": "^5.0.1",
"@capacitor-community/sqlite": "6.0.2",
@@ -9452,8 +9452,8 @@
}
},
"node_modules/@timesafari/daily-notification-plugin": {
"version": "1.1.3",
"resolved": "git+https://gitea.anomalistdesign.com/trent_larson/daily-notification-plugin.git#a62f54b8a877d78f757373897b36804c203b8351",
"version": "1.1.6",
"resolved": "git+https://gitea.anomalistdesign.com/trent_larson/daily-notification-plugin.git#9feaf60c8472d54365712473353bdd4eadb7dc90",
"license": "MIT",
"workspaces": [
"packages/*"