mirror of https://github.com/zulip/zulip.git
stream_settings: Update save discard buttons when live-updating.
This commit adds code to hide save discard buttons and discard the changes if another user changed a setting in the same subsection.
This commit is contained in:
parent
5da1e57fc2
commit
08f35e08a4
|
@ -399,7 +399,12 @@ export function update_setting_element(sub, setting_name) {
|
|||
}
|
||||
|
||||
const $elem = $(`#id_${CSS.escape(setting_name)}`);
|
||||
settings_org.discard_stream_property_element_changes($elem, sub);
|
||||
const $subsection = $elem.closest(".settings-subsection-parent");
|
||||
if ($subsection.find(".save-button-controls").hasClass("hide")) {
|
||||
settings_org.discard_stream_property_element_changes($elem);
|
||||
} else {
|
||||
settings_org.discard_stream_settings_subsection_changes($subsection, sub);
|
||||
}
|
||||
}
|
||||
|
||||
export function enable_or_disable_add_subscribers_elements(
|
||||
|
|
Loading…
Reference in New Issue