mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-18 13:35:10 +02:00
Merge pull request #3987 from thelounge/xpaw/notif-state
Refresh notification permission state when push is enabled
This commit is contained in:
commit
9502b6adf0
|
@ -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
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue