settings: Pass dense_mode value if changing other settings.

This commit updates code to pass dense_mode value in request
if changing font size or line height settings to some value
other than legacy settings.
This commit is contained in:
Sahil Batra 2024-07-18 14:47:44 +05:30 committed by Tim Abbott
parent c1c4c95ce7
commit 59068c24e9
1 changed files with 9 additions and 0 deletions

View File

@ -254,6 +254,15 @@ export function set_up(settings_panel: SettingsPanel): void {
: NON_COMPACT_MODE_LINE_HEIGHT_PERCENT; : 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 const $status_element = $input_elem
.closest(".subsection-parent") .closest(".subsection-parent")
.find(".alert-notification"); .find(".alert-notification");