mirror of
https://github.com/zulip/zulip.git
synced 2026-07-09 21:21:47 +08:00
settings: Fix stream permissions warning banner persistence issue.
Previously, the stream permissions warning banner failed to hide after changes to the stream's privacy settings were saved or discarded. This fix addresses the issue, ensuring the banner behaves as expected by disappearing when changes to make the stream private are either saved or discarded. Fixes: #29625.
This commit is contained in:
parent
07fbbcd142
commit
1ce429ae7c
@ -517,11 +517,22 @@ export function discard_property_element_changes(elem, for_realm_default_setting
|
||||
break;
|
||||
case "emojiset":
|
||||
case "user_list_style":
|
||||
case "stream_privacy":
|
||||
// Because this widget has a radio button structure, it
|
||||
// needs custom reset code.
|
||||
$elem.find(`input[value='${CSS.escape(property_value)}']`).prop("checked", true);
|
||||
break;
|
||||
case "stream_privacy": {
|
||||
$elem.find(`input[value='${CSS.escape(property_value)}']`).prop("checked", true);
|
||||
|
||||
// Hide stream privacy warning banner
|
||||
const $stream_permissions_warning_banner = $(
|
||||
"#stream_permission_settings .stream-permissions-warning-banner",
|
||||
);
|
||||
if (!$stream_permissions_warning_banner.is(":empty")) {
|
||||
$stream_permissions_warning_banner.empty();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "email_notifications_batching_period_seconds":
|
||||
case "email_notification_batching_period_edit_minutes":
|
||||
settings_notifications.set_notification_batching_ui(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user