diff --git a/client/js/webpush.js b/client/js/webpush.js index efc72a8a..6f3f8ab7 100644 --- a/client/js/webpush.js +++ b/client/js/webpush.js @@ -73,11 +73,13 @@ function togglePushSubscription() { .then((subscription) => { socket.emit("push:register", subscription.toJSON()); store.commit("pushNotificationState", "subscribed"); + store.commit("refreshDesktopNotificationState"); }); }) ) .catch((err) => { store.commit("pushNotificationState", "unsupported"); + store.commit("refreshDesktopNotificationState"); console.error(err); // eslint-disable-line no-console }); }