Refresh notification permission state when push is enabled
This commit is contained in:
parent
f979c72ca7
commit
b7c5f2031c
@ -73,11 +73,13 @@ function togglePushSubscription() {
|
|||||||
.then((subscription) => {
|
.then((subscription) => {
|
||||||
socket.emit("push:register", subscription.toJSON());
|
socket.emit("push:register", subscription.toJSON());
|
||||||
store.commit("pushNotificationState", "subscribed");
|
store.commit("pushNotificationState", "subscribed");
|
||||||
|
store.commit("refreshDesktopNotificationState");
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
store.commit("pushNotificationState", "unsupported");
|
store.commit("pushNotificationState", "unsupported");
|
||||||
|
store.commit("refreshDesktopNotificationState");
|
||||||
console.error(err); // eslint-disable-line no-console
|
console.error(err); // eslint-disable-line no-console
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user