Bugfixes for auto login
This commit is contained in:
parent
003fedde01
commit
867efd53a2
@ -461,14 +461,15 @@ void MainWindow::on_actionLaunchInstance_triggered()
|
|||||||
{
|
{
|
||||||
if (m_selectedInstance)
|
if (m_selectedInstance)
|
||||||
{
|
{
|
||||||
bool autoLogin = MMC->settings()->get("AutoLogin").toBool();
|
doLogin();
|
||||||
if(autoLogin) doAutoLogin();
|
|
||||||
else doLogin();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::doAutoLogin()
|
void MainWindow::doAutoLogin()
|
||||||
{
|
{
|
||||||
|
if (!m_selectedInstance)
|
||||||
|
return;
|
||||||
|
|
||||||
Keyring * k = Keyring::instance();
|
Keyring * k = Keyring::instance();
|
||||||
QStringList accounts = k->getStoredAccounts("minecraft");
|
QStringList accounts = k->getStoredAccounts("minecraft");
|
||||||
|
|
||||||
@ -480,6 +481,7 @@ void MainWindow::doAutoLogin()
|
|||||||
if(!password.isEmpty())
|
if(!password.isEmpty())
|
||||||
{
|
{
|
||||||
QLOG_INFO() << "Automatically logging in with stored account: " << username;
|
QLOG_INFO() << "Automatically logging in with stored account: " << username;
|
||||||
|
m_activeInst = m_selectedInstance;
|
||||||
doLogin(username, password);
|
doLogin(username, password);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user