create stream: Fix widget for changing privacy doesn't render initially.

When admin user create new private stream, widget for changing privacy
of stream doesn't render. Because we render subscription-settings
template partially on subscription-add event, so this case wasn't
handled.

Fixes #9469
This commit is contained in:
Yashashvi Dave
2018-06-01 19:07:21 +05:30
committed by Tim Abbott
parent 562f5387e3
commit 3422766c25
2 changed files with 5 additions and 3 deletions

View File

@@ -263,6 +263,10 @@ exports.update_settings_for_subscribed = function (sub) {
button.toggleClass("checked");
settings_button.text(i18n.t("Unsubscribe"));
if (sub.can_change_stream_permissions) {
$(".change-stream-privacy").show();
}
} else {
exports.add_sub_to_table(sub);
}