From fa46663dda7b051493ebb453dfce82d8b600f832 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 24 Nov 2024 17:40:29 -0700 Subject: [PATCH] fix problem when notification subscription isn't found --- CHANGELOG.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- src/App.vue | 14 ++++++++++++++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7647926..4ba957c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.3.34] - 2024.11 +## [0.3.35] - 2024.11.24 ### Added - Daily reliable, hard-coded notification message - Setting to change the partner API server diff --git a/package-lock.json b/package-lock.json index f58eb5c..2ce1f41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "TimeSafari", - "version": "0.3.34", + "version": "0.3.35", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "TimeSafari", - "version": "0.3.34", + "version": "0.3.35", "dependencies": { "@capacitor/android": "^6.1.2", "@capacitor/cli": "^6.1.2", diff --git a/package.json b/package.json index 3188e94..69c1b10 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "TimeSafari", - "version": "0.3.34", + "version": "0.3.35", "scripts": { "dev": "vite", "serve": "vite preview", diff --git a/src/App.vue b/src/App.vue index 7b0c451..2ec9239 100644 --- a/src/App.vue +++ b/src/App.vue @@ -362,6 +362,20 @@ export default class App extends Vue { ); }); + if (!subscription) { + // there is no endpoint or auth for the server to compare, so we're done + this.$notify( + { + group: "alert", + type: "info", + title: "Finished", + text: "Notifications are off.", // a different message so I know there are none stored + }, + 5000, + ); + return true; + } + const serverSubscription = { ...subscription, };