From d938f73d05615511c9474fb701ad2e8a9c234866 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Sun, 19 Dec 2021 14:41:15 +0000 Subject: [PATCH] refactor: Move code for can't-subscribe popover. --- static/js/stream_edit.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/js/stream_edit.js b/static/js/stream_edit.js index 40687e46f3..d9dcf1058f 100644 --- a/static/js/stream_edit.js +++ b/static/js/stream_edit.js @@ -368,6 +368,10 @@ function show_subscription_settings(sub) { return; } + if (!stream_data.can_toggle_subscription(sub)) { + stream_ui_updates.initialize_cant_subscribe_popover(sub); + } + enable_subscriber_management({sub, parent_container: edit_container}); } @@ -382,10 +386,6 @@ function enable_subscriber_management({sub, parent_container}) { get_text_from_item, }); - if (!stream_data.can_toggle_subscription(sub)) { - stream_ui_updates.initialize_cant_subscribe_popover(sub); - } - const user_ids = peer_data.get_subscribers(stream_id); const users = people.get_users_from_ids(user_ids); people.sort_but_pin_current_user_on_top(users);