diff --git a/web/src/settings_config.ts b/web/src/settings_config.ts
index 034e34ff12..d32622ec33 100644
--- a/web/src/settings_config.ts
+++ b/web/src/settings_config.ts
@@ -771,6 +771,7 @@ type NotificationSettingCheckbox = {
setting_name: string;
is_disabled: boolean;
is_checked: boolean;
+ is_mobile_checkbox: boolean;
};
export function get_notifications_table_row_data(
@@ -784,6 +785,7 @@ export function get_notifications_table_row_data(
setting_name: "",
is_disabled: true,
is_checked: false,
+ is_mobile_checkbox: false,
};
}
@@ -796,9 +798,11 @@ export function get_notifications_table_row_data(
setting_name,
is_disabled: false,
is_checked: checked,
+ is_mobile_checkbox: false,
};
if (column === "mobile") {
checkbox.is_disabled = !page_params.realm_push_notifications_enabled;
+ checkbox.is_mobile_checkbox = true;
}
return checkbox;
});
diff --git a/web/templates/settings/notification_settings.hbs b/web/templates/settings/notification_settings.hbs
index 161485c06b..a0a8802909 100644
--- a/web/templates/settings/notification_settings.hbs
+++ b/web/templates/settings/notification_settings.hbs
@@ -34,6 +34,7 @@
setting_name=this.setting_name
is_checked=this.is_checked
is_disabled=this.is_disabled
+ is_mobile_checkbox=this.is_mobile_checkbox
prefix=../../prefix }}
{{/each}}
diff --git a/web/templates/settings/notification_settings_checkboxes.hbs b/web/templates/settings/notification_settings_checkboxes.hbs
index 841b6456cb..7327c4f757 100644
--- a/web/templates/settings/notification_settings_checkboxes.hbs
+++ b/web/templates/settings/notification_settings_checkboxes.hbs
@@ -1,9 +1,11 @@
-
+
+
+
|
diff --git a/web/tests/settings_config.test.js b/web/tests/settings_config.test.js
index ff613322b2..b5a197219a 100644
--- a/web/tests/settings_config.test.js
+++ b/web/tests/settings_config.test.js
@@ -48,26 +48,31 @@ run_test("all_notifications", () => {
{
is_checked: false,
is_disabled: false,
+ is_mobile_checkbox: false,
setting_name: "enable_stream_desktop_notifications",
},
{
is_checked: true,
is_disabled: false,
+ is_mobile_checkbox: false,
setting_name: "enable_stream_audible_notifications",
},
{
is_checked: true,
is_disabled: true,
+ is_mobile_checkbox: true,
setting_name: "enable_stream_push_notifications",
},
{
is_checked: false,
is_disabled: false,
+ is_mobile_checkbox: false,
setting_name: "enable_stream_email_notifications",
},
{
is_checked: false,
is_disabled: false,
+ is_mobile_checkbox: false,
setting_name: "wildcard_mentions_notify",
},
],
@@ -78,26 +83,31 @@ run_test("all_notifications", () => {
{
is_checked: false,
is_disabled: false,
+ is_mobile_checkbox: false,
setting_name: "enable_desktop_notifications",
},
{
is_checked: true,
is_disabled: false,
+ is_mobile_checkbox: false,
setting_name: "enable_sounds",
},
{
is_checked: false,
is_disabled: true,
+ is_mobile_checkbox: true,
setting_name: "enable_offline_push_notifications",
},
{
is_checked: true,
is_disabled: false,
+ is_mobile_checkbox: false,
setting_name: "enable_offline_email_notifications",
},
{
is_checked: false,
is_disabled: true,
+ is_mobile_checkbox: false,
setting_name: "",
},
],
@@ -108,26 +118,31 @@ run_test("all_notifications", () => {
{
is_checked: false,
is_disabled: false,
+ is_mobile_checkbox: false,
setting_name: "enable_followed_topic_desktop_notifications",
},
{
is_checked: true,
is_disabled: false,
+ is_mobile_checkbox: false,
setting_name: "enable_followed_topic_audible_notifications",
},
{
is_checked: false,
is_disabled: true,
+ is_mobile_checkbox: true,
setting_name: "enable_followed_topic_push_notifications",
},
{
is_checked: true,
is_disabled: false,
+ is_mobile_checkbox: false,
setting_name: "enable_followed_topic_email_notifications",
},
{
is_checked: false,
is_disabled: false,
+ is_mobile_checkbox: false,
setting_name: "enable_followed_topic_wildcard_mentions_notify",
},
],