Skip to content

A platform for community discussion. Free, open, simple.

UX: Remove "Live Notifications" user profile section on iOS

Penar Musaraj39a7b93c4a9f
diff --git a/app/assets/javascripts/discourse/controllers/preferences/notifications.js b/app/assets/javascripts/discourse/controllers/preferences/notifications.js
index 078d0b3fbb1..5667a55fda9 100644
--- a/app/assets/javascripts/discourse/controllers/preferences/notifications.js
+++ b/app/assets/javascripts/discourse/controllers/preferences/notifications.js
@@ -85,6 +85,9 @@ export default Controller.extend({
},
{ name: I18n.t("user.new_topic_duration.last_here"), value: -2 }
];
+
+ const caps = Discourse.__container__.lookup("capabilities:main");
+ this.isIOS = caps.isIOS;
},
actions: {
diff --git a/app/assets/javascripts/discourse/templates/preferences/notifications.hbs b/app/assets/javascripts/discourse/templates/preferences/notifications.hbs
index 03ca349d677..f3c1b00f527 100644
--- a/app/assets/javascripts/discourse/templates/preferences/notifications.hbs
+++ b/app/assets/javascripts/discourse/templates/preferences/notifications.hbs
@@ -43,12 +43,14 @@
</div>
</div>
-<div class="control-group desktop-notifications">
- <label class="control-label">{{i18n 'user.desktop_notifications.label'}}</label>
- {{desktop-notification-config}}
- <div class="instructions">{{i18n 'user.desktop_notifications.each_browser_note'}}</div>
- {{plugin-outlet name="user-preferences-desktop-notifications" args=(hash model=model save=(action "save"))}}
-</div>
+{{#unless isIOS}}
+ <div class="control-group desktop-notifications">
+ <label class="control-label">{{i18n 'user.desktop_notifications.label'}}</label>
+ {{desktop-notification-config}}
+ <div class="instructions">{{i18n 'user.desktop_notifications.each_browser_note'}}</div>
+ {{plugin-outlet name="user-preferences-desktop-notifications" args=(hash model=model save=(action "save"))}}
+ </div>
+{{/unless}}
{{#if siteSettings.enable_personal_messages}}
<div class="control-group private-messages">