Refresh notification permission state when push is enabled

This commit is contained in:
Pavel Djundik 2020-07-15 16:08:36 +03:00
parent f979c72ca7
commit b7c5f2031c

View file

@ -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
});
}