settings: Migrate notification checkboxes to table format.

Here we have migrated checkboxes of all general notifications to the table.
By general notifications we mean, Mobile, Email, Desktop audio, and visual
notifications.

This is a part of a bigger migration to simply our notifications setting
changing infrastructure for all streams and individual streams. Later we
will add more row to this for different categories of notifications in
addition to the current ones ("Streams" and "PMs, mentions, alerts").

Fixes: #12182.
This commit is contained in:
Pragati Agrawal
2020-03-23 12:59:48 +05:30
committed by Tim Abbott
parent 2f213f7c8e
commit dd13136371
9 changed files with 117 additions and 70 deletions

View File

@@ -753,11 +753,7 @@ exports.handle_global_notification_updates = function (notification_name, settin
page_params[notification_name] = setting;
}
if (
settings_notifications.all_notifications.settings.stream_notification_settings.includes(
notification_name
)
) {
if (settings_notifications.stream_notification_settings.includes(notification_name)) {
notification_name = notification_name.replace("enable_stream_", "");
stream_ui_updates.update_notification_setting_checkbox(notification_name);
}