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:
Yashashvi Dave 2019-04-06 17:10:43 +05:30 committed by Tim Abbott
parent 9dd9ea5721
commit a71eb6aa15
2 changed files with 3 additions and 3 deletions

View File

@ -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) {

View File

@ -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)) {