subscription: Fix error in appending current user on top of subscriber list.

This commit is contained in:
YJDave
2018-04-08 23:54:10 +05:30
committed by Tim Abbott
parent f5a7d125c9
commit 025956482a
2 changed files with 3 additions and 5 deletions

View File

@@ -74,10 +74,8 @@ exports.add_me_to_member_list = function (sub) {
// Add the user to the member list if they're currently // Add the user to the member list if they're currently
// viewing the members of this stream // viewing the members of this stream
var stream_settings = settings_for_sub(sub); var stream_settings = settings_for_sub(sub);
if (sub.render_subscribers && stream_settings.hasClass('in')) { if (sub.render_subscribers && overlays.streams_open()) {
exports.prepend_subscriber( exports.prepend_subscriber(stream_settings, people.my_current_email());
stream_settings,
people.my_current_email());
} }
}; };

View File

@@ -259,7 +259,7 @@ exports.update_settings_for_subscribed = function (sub) {
exports.add_sub_to_table(sub); exports.add_sub_to_table(sub);
} }
if (stream_edit.is_sub_settings_active(sub)) { if (stream_edit.is_sub_settings_active(sub) && sub.invite_only) {
stream_edit.rerender_subscribers_list(sub); stream_edit.rerender_subscribers_list(sub);
} }