Merge branch 'develop' of github.com:MultiMC/MultiMC5 into develop

This commit is contained in:
Andrew
2013-12-09 12:06:33 -06:00
12 changed files with 83 additions and 40 deletions

View File

@ -844,16 +844,13 @@ void MainWindow::doLaunch()
progDialog.exec(task.get());
auto status = account->accountStatus();
if(status == Online) // Online mode! Refresh the token.
if(status != NotVerified)
{
updateInstance(m_selectedInstance, account);
return;
}
else if(status == Verified) // Offline mode with a verified account
{
launchInstance(m_selectedInstance, account);
return;
}
// revert from online to verified.
account->downgrade();
return;
}
if (loginWithPassword(account, tr("Your account is currently not logged in. Please enter your password to log in again.")))
updateInstance(m_selectedInstance, account);
@ -881,7 +878,8 @@ bool MainWindow::loginWithPassword(MojangAccountPtr account, const QString& erro
void MainWindow::updateInstance(BaseInstance* instance, MojangAccountPtr account)
{
auto updateTask = instance->doUpdate(true);
bool only_prepare = account->accountStatus() != Online;
auto updateTask = instance->doUpdate(only_prepare);
if (!updateTask)
{
launchInstance(instance, account);