Fix: Android reminder toast and boot recovery

- Toast/notify: Keep dialog open until schedule flow finishes so success/error
  $notify runs while component is mounted (fixes missing toast on Android).
  Add success/error notify in edit-reminder callback (AccountViewView).
- Boot recovery: Split BootReceiver intent-filter so BOOT_COMPLETED and
  LOCKED_BOOT_COMPLETED use a filter without <data>; use a separate filter
  with <data scheme="package"/> for MY_PACKAGE_REPLACED/PACKAGE_REPLACED.
  Boot broadcasts have no Uri and were not matching the previous filter,
  so daily reminder now reschedules after device restart.
This commit is contained in:
Jose Olarte III
2026-02-17 17:55:13 +08:00
parent 0e096b1a46
commit 17ccfd1fea
3 changed files with 21 additions and 5 deletions

View File

@@ -665,15 +665,15 @@ export default class PushNotificationPermission extends Vue {
/**
* Handles the main action button click
* Close only after async flow completes so success/error $notify runs while component is mounted (fixes Android).
*/
handleTurnOnNotifications() {
this.close();
// Route to native or web notification flow based on platform
async handleTurnOnNotifications() {
if (this.isNativePlatform) {
this.turnOnNativeNotifications();
await this.turnOnNativeNotifications();
} else {
this.turnOnNotifications();
await this.turnOnNotifications();
}
this.close();
}
/**

View File

@@ -1332,7 +1332,19 @@ export default class AccountViewView extends Vue {
});
this.notifyingReminderMessage = message || "";
this.notifyingReminderTime = timeText;
this.notify.success("Daily reminder updated.", TIMEOUTS.STANDARD);
} else {
this.notify.error(
"Failed to update reminder. Please try again.",
TIMEOUTS.STANDARD,
);
}
} catch (err) {
logger.error("[AccountViewView] Edit reminder schedule failed:", err);
this.notify.error(
"Failed to update reminder. Please try again.",
TIMEOUTS.STANDARD,
);
} finally {
this.editReminderScheduleInProgress = false;
}