diff options
author | Andrew <forkk@forkk.net> | 2013-12-09 12:06:33 -0600 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-12-09 12:06:33 -0600 |
commit | 712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d (patch) | |
tree | 3a525b7e4488a7ea03521ddff33800ef81f92f07 /gui/MainWindow.cpp | |
parent | 7f52bed9e3f559adcbcf3f3c1c7ac2251964db8c (diff) | |
parent | b0dbd4f4afcf60e4021cbb3218bfe280c4989859 (diff) | |
download | MultiMC-712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d.tar MultiMC-712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d.tar.gz MultiMC-712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d.tar.lz MultiMC-712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d.tar.xz MultiMC-712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d.zip |
Merge branch 'develop' of github.com:MultiMC/MultiMC5 into develop
Diffstat (limited to 'gui/MainWindow.cpp')
-rw-r--r-- | gui/MainWindow.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index 94527b93..8c75776d 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -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); |