mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 09:59:59 +03:00
Merge branch 'develop' of github.com:MultiMC/MultiMC5 into develop
This commit is contained in:
commit
712b87c643
12 changed files with 83 additions and 40 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue