FEATURE: Use feature detection for showing push notification in iOS (#20338)

* FEATURE: Use feature detection for showing push notification in iOS

* Don't want this on DiscourseHub as it's confusing
This commit is contained in:
Rafael dos Santos Silva 2023-02-16 18:00:37 -03:00 committed by GitHub
parent 584d9a9438
commit 8a224bf999
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -48,8 +48,7 @@ export function isPushNotificationsSupported() {
"PushManager" in window &&
!caps.isAppWebview &&
navigator.serviceWorker.controller &&
navigator.serviceWorker.controller.state === "activated" &&
!caps.isIOS
navigator.serviceWorker.controller.state === "activated"
)
) {
return false;

View File

@ -23,7 +23,7 @@
</div>
</div>
{{#unless this.capabilities.isIOS}}
{{#unless this.capabilities.isAppWebview}}
<div class="control-group desktop-notifications">
<label class="control-label">{{i18n
"user.desktop_notifications.label"