settings_bots: Do not destroy section when switching to users section.

We were destroying the bots table in start_data_load() which is now
only called for the users section since the refactoring done in
5c16bb9c99.
This commit is contained in:
Rohitt Vashishtha 2020-05-19 02:06:37 +05:30 committed by showell
parent 7ad5bea3e6
commit c70eb8b772
1 changed files with 3 additions and 3 deletions

View File

@ -238,7 +238,9 @@ function human_info(person) {
}
section.bots.create_table = () => {
loading.make_indicator($('#admin_page_bots_loading_indicator'), {text: 'Loading...'});
const $bots_table = $("#admin_bots_table");
$bots_table.hide();
const bot_user_ids = bot_data.all_user_ids();
list_render.create($bots_table, bot_user_ids, {
@ -265,7 +267,7 @@ section.bots.create_table = () => {
});
loading.destroy_indicator($('#admin_page_bots_loading_indicator'));
$("#admin_bots_table").show();
$bots_table.show();
};
section.active.create_table = (active_users) => {
@ -358,11 +360,9 @@ exports.update_user_data = function (user_id, new_data) {
function start_data_load() {
loading.make_indicator($('#admin_page_users_loading_indicator'), {text: 'Loading...'});
loading.make_indicator($('#admin_page_bots_loading_indicator'), {text: 'Loading...'});
loading.make_indicator($('#admin_page_deactivated_users_loading_indicator'), {text: 'Loading...'});
$("#admin_deactivated_users_table").hide();
$("#admin_users_table").hide();
$("#admin_bots_table").hide();
// Populate users and bots tables
channel.get({