mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 10:19:52 +01:00
Merge pull request #930 from Retrospring/fix/push-enable-when-subbed
Prevent push enable prompt (inbox) when already subscribed
This commit is contained in:
commit
b65242d81e
1 changed files with 1 additions and 0 deletions
|
@ -14,6 +14,7 @@ export default (): void => {
|
|||
navigator.serviceWorker.getRegistration().then(async registration => {
|
||||
const subscription = await registration?.pushManager.getSubscription();
|
||||
if (subscription) {
|
||||
document.querySelector('.push-settings')?.classList.add('d-none');
|
||||
document.querySelector('button[data-action="push-enable"]')?.classList.add('d-none');
|
||||
document.querySelector('[data-action="push-disable"]')?.classList.remove('d-none');
|
||||
|
||||
|
|
Loading…
Reference in a new issue