Parcourir la source

Fix iOS prompt

nimbleghost il y a 2 ans
Parent
commit
0c496ca223
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      web/src/app/Notifier.js

+ 2 - 1
web/src/app/Notifier.js

@@ -128,7 +128,8 @@ class Notifier {
   }
 
   iosSupportedButInstallRequired() {
-    return this.pushSupported() && "standalone" in window.navigator && window.navigator.standalone === false;
+    // no PushManager when not installed, but it _is_ supported.
+    return config.enable_web_push && "serviceWorker" in navigator && window.navigator.standalone === false;
   }
 }