From 17ccfd1fea42366f4a72b74f9f43c7a67cd4d7b1 Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Tue, 17 Feb 2026 17:55:13 +0800 Subject: [PATCH] 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 ; use a separate filter with 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. --- android/app/src/main/AndroidManifest.xml | 4 ++++ src/components/PushNotificationPermission.vue | 10 +++++----- src/views/AccountViewView.vue | 12 ++++++++++++ 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 6348d220..00b7c623 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -64,6 +64,8 @@ android:exported="false" /> + + + diff --git a/src/components/PushNotificationPermission.vue b/src/components/PushNotificationPermission.vue index 785d4080..96c236ad 100644 --- a/src/components/PushNotificationPermission.vue +++ b/src/components/PushNotificationPermission.vue @@ -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(); } /** diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index 88358bef..60cfe404 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -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; }