summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/MainWindow.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp
index fd35e94e..bf2ce6b4 100644
--- a/gui/MainWindow.cpp
+++ b/gui/MainWindow.cpp
@@ -791,16 +791,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);
@@ -828,7 +825,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);