refactor: Move code for can't-subscribe popover.

This commit is contained in:
Steve Howell 2021-12-19 14:41:15 +00:00 committed by Tim Abbott
parent a9271e7a99
commit d938f73d05
1 changed files with 4 additions and 4 deletions

View File

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