mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 09:58:06 +00:00
settings: Fix live update code of notification settings.
We add code for live updating notification batching period setting. This commit also adds 'continue' statement in the else-if condition of update_page function such that we do not execute the code of checkbox settings for notification sound and email batching period settings. We also update the other_notification_settings list in settings_config.ts to remove email_notifications_batching_period and instead have email_notifications_batching_period_seconds which is the correct name of setting used in backend and in the events sent to the clients such that the live-update is done correctly.
This commit is contained in:
@@ -149,8 +149,12 @@ export function update_page() {
|
||||
} else if (setting === "desktop_icon_count_display") {
|
||||
update_desktop_icon_count_display();
|
||||
continue;
|
||||
} else if (setting === "notification_sound") {
|
||||
container.find(".setting_notification_sound").val(user_settings.notification_sound);
|
||||
} else if (
|
||||
setting === "notification_sound" ||
|
||||
setting === "email_notifications_batching_period_seconds"
|
||||
) {
|
||||
container.find(`.setting_${CSS.escape(setting)}`).val(user_settings[setting]);
|
||||
continue;
|
||||
}
|
||||
|
||||
container.find(`.${CSS.escape(setting)}`).prop("checked", user_settings[setting]);
|
||||
|
||||
Reference in New Issue
Block a user