Loading at the begining

This commit is contained in:
Jeremy Zhang 2017-04-26 00:30:36 -07:00
parent 64089a536f
commit 22a906f259

View File

@ -87,14 +87,16 @@
} }
); );
$('#loginmodal').modal('open');
lock_login_fields();
var guild = query_guild(); var guild = query_guild();
guild.fail(function() { guild.fail(function() {
$('#loginmodal').modal('open'); unlock_login_fields();
}); });
guild.done(function(data) { guild.done(function(data) {
initialize_embed(data); initialize_embed(data);
//$('#loginmodal').modal('open');
}); });
}); });
@ -115,15 +117,17 @@
} }
function initialize_embed(guildobj) { function initialize_embed(guildobj) {
$('#loginmodal').modal('close');
unlock_login_fields();
if (guildobj === undefined) { if (guildobj === undefined) {
var guild = query_guild(); var guild = query_guild();
guild.done(function(data) { guild.done(function(data) {
prepare_guild(data); prepare_guild(data);
$('#loginmodal').modal('close');
unlock_login_fields();
}); });
} else { } else {
prepare_guild(guildobj); prepare_guild(guildobj);
$('#loginmodal').modal('close');
unlock_login_fields();
} }
} }
@ -399,6 +403,7 @@
return; return;
} }
currently_fetching = true; currently_fetching = true;
times_fetched += 1;
var channel_id = selected_channel; var channel_id = selected_channel;
var fet; var fet;
var jumpscroll; var jumpscroll;
@ -449,7 +454,6 @@
}); });
fet.always(function() { fet.always(function() {
currently_fetching = false; currently_fetching = false;
times_fetched += 1;
}); });
} }