Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

settings: Pass dense_mode value if changing other settings.

Sahil Batra59068c24e929
diff --git a/web/src/settings_preferences.ts b/web/src/settings_preferences.ts
index c30bb1d528f..5fcda4ba1bf 100644
--- a/web/src/settings_preferences.ts
+++ b/web/src/settings_preferences.ts
@@ -254,6 +254,15 @@ export function set_up(settings_panel: SettingsPanel): void {
: NON_COMPACT_MODE_LINE_HEIGHT_PERCENT;
}
+ if (
+ ((setting === "web_font_size_px" && setting_value !== LEGACY_FONT_SIZE_PX) ||
+ (setting === "web_line_height_percent" &&
+ setting_value !== LEGACY_LINE_HEIGHT_PERCENT)) &&
+ user_settings.dense_mode
+ ) {
+ data.dense_mode = false;
+ }
+
const $status_element = $input_elem
.closest(".subsection-parent")
.find(".alert-notification");