Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
streams: Fix live-update bug of disabling web-public option instead of hiding.
Sahil Batra9bb506c6f7fe
diff --git a/static/js/stream_settings_ui.js b/static/js/stream_settings_ui.jsindex fd6610056d5..a0d4d82f7f0 100644--- a/static/js/stream_settings_ui.js+++ b/static/js/stream_settings_ui.js@@ -994,8 +994,15 @@ export function update_web_public_stream_privacy_option_state(container) {);if (!page_params.server_web_public_streams_enabled ||- (!page_params.realm_enable_spectator_access && !web_public_stream_elem.is(":checked"))+ !page_params.realm_enable_spectator_access) {+ const for_change_privacy_modal = container.attr("id") === "stream_privacy_modal";+ if (for_change_privacy_modal && web_public_stream_elem.is(":checked")) {+ // We do not hide web-public option in the "Change privacy" modal if+ // stream is web-public already. The option is disabled in this case.+ web_public_stream_elem.prop("disabled", true);+ return;+ }web_public_stream_elem.closest(".radio-input-parent").hide();container.find(".stream-privacy-values .radio-input-parent:visible:last")