From 39a7b93c4a9ff5c2798d2fe619bdc8668811064f Mon Sep 17 00:00:00 2001 From: Penar Musaraj Date: Sun, 15 Mar 2020 11:09:57 -0400 Subject: [PATCH] UX: Remove "Live Notifications" user profile section on iOS --- .../controllers/preferences/notifications.js | 3 +++ .../templates/preferences/notifications.hbs | 14 ++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) 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 @@ -
- - {{desktop-notification-config}} -
{{i18n 'user.desktop_notifications.each_browser_note'}}
- {{plugin-outlet name="user-preferences-desktop-notifications" args=(hash model=model save=(action "save"))}} -
+{{#unless isIOS}} +
+ + {{desktop-notification-config}} +
{{i18n 'user.desktop_notifications.each_browser_note'}}
+ {{plugin-outlet name="user-preferences-desktop-notifications" args=(hash model=model save=(action "save"))}} +
+{{/unless}} {{#if siteSettings.enable_personal_messages}}