diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index 65f261b..8af43b7 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -107,7 +107,7 @@
@@ -130,10 +130,14 @@ >
-
+
Notification status may have changed. Revisit this page to see the latest setting.
+
+ Waiting for system initialization... + +
Test your notification setup. @@ -515,6 +519,7 @@ export default class AccountViewView extends Vue { limits: RateLimits | null = null; limitsMessage = ""; loadingLimits = true; // might as well now that we do it on mount, to avoid flashing the registration message + serviceWorkerReady = false; showContactGives = false; showDidCopy = false; @@ -562,6 +567,8 @@ export default class AccountViewView extends Vue { async mounted() { try { const registration = await navigator.serviceWorker.ready; + // there may be a long pause here on first initialization + this.serviceWorkerReady = true; this.subscription = await registration.pushManager.getSubscription(); this.isSubscribed = !!this.subscription; } catch (error) { diff --git a/sw_scripts/additional-scripts.js b/sw_scripts/additional-scripts.js index 60c0084..87b0172 100644 --- a/sw_scripts/additional-scripts.js +++ b/sw_scripts/additional-scripts.js @@ -18,7 +18,9 @@ function logConsoleAndDb(message, arg1, arg2) { self.appendDailyLog(fullMessage); } else { // sometimes we get the error: "Uncaught TypeError: self.appendDailyLog is not a function" - console.log("Not logging to DB because self.appendDailyLog doesn't exist."); + console.log( + "Not logging to DB (often because self.appendDailyLog doesn't exist).", + ); } }