You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -409,6 +425,11 @@ class RealTimeNotifications {
409
425
}
410
426
411
427
asyncrequestDisablePush(){
428
+
if(this._disablingSWP){
429
+
return;
430
+
}
431
+
this._disablingSWP=true;
432
+
412
433
varoutput=awaitdialogs.confirm("Are you sure you want to disable push notifications? If you do that, you'll not recieve any more system notifications from the bell.");
413
434
414
435
if(!output){
@@ -424,6 +445,27 @@ class RealTimeNotifications {
424
445
}
425
446
426
447
this.loadNotifications();
448
+
this._disablingSWP=false;
449
+
}
450
+
451
+
asyncrequestEnablePush(){
452
+
if(this._enablingSWP){
453
+
return;
454
+
}
455
+
this._enablingSWP=true;
456
+
varprevText=this.addSWPButton.textContent;
457
+
try{
458
+
this.addSWPButton.textContent="Click allow if it appears anywhere";
459
+
awaitnotify.requestPermission();
460
+
this.addSWPButton.textContent="Subscribing to push notifications...";
0 commit comments