mirror of https://github.com/zulip/zulip.git
subs: Extract change-stream-privacy block from function.
This commit removes code to update-stream-privacy-btn in stream settings from update-sub-settings function. Because stream-privacy-btn is not part of regular sub-settings, it is admins only settings.
This commit is contained in:
parent
9dd9ea5721
commit
a71eb6aa15
|
@ -68,9 +68,6 @@ exports.hide_sub_settings = function (sub) {
|
|||
$settings.find(".regular_subscription_settings").removeClass('in');
|
||||
// Clear email address widget
|
||||
$settings.find(".email-address").html("");
|
||||
if (!sub.can_change_stream_permissions) {
|
||||
$settings.find(".change-stream-privacy").hide();
|
||||
}
|
||||
};
|
||||
|
||||
exports.show_sub_settings = function (sub) {
|
||||
|
|
|
@ -348,6 +348,9 @@ exports.update_settings_for_unsubscribed = function (sub) {
|
|||
exports.rerender_subscriptions_settings(sub);
|
||||
stream_ui_updates.update_check_button_for_sub(sub);
|
||||
stream_ui_updates.update_settings_button_for_sub(sub);
|
||||
if (!sub.can_change_stream_permissions) {
|
||||
$(".change-stream-privacy").hide();
|
||||
}
|
||||
|
||||
stream_data.update_stream_email_address(sub, "");
|
||||
if (stream_edit.is_sub_settings_active(sub)) {
|
||||
|
|
Loading…
Reference in New Issue