mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2025-03-14 13:20:59 +00:00
GH-5166 Adding refresh during Instance Launch
In the login function of LaunchController, added requestRefresh on the current m_accountToUse. This allows the accountState of accountToUse to be updated before running through what login is meant to depending on the accountState. This is to allow for the cases where a device might be back online after launching the Launcher. Putting this in the tryagain while loop also allows to check if a users account is expired during the login process.
This commit is contained in:
parent
7450faaf13
commit
e48134136a
@ -117,6 +117,11 @@ void LaunchController::login() {
|
||||
|
||||
while (tryagain)
|
||||
{
|
||||
// Force account refresh on the account used to launch the instance,
|
||||
// updating the AccountState everytime between instance launch
|
||||
auto accounts = APPLICATION->accounts();
|
||||
accounts->requestRefresh(m_accountToUse->internalId());
|
||||
|
||||
m_session = std::make_shared<AuthSession>();
|
||||
m_session->wants_online = m_online;
|
||||
m_accountToUse->fillSession(m_session);
|
||||
|
Loading…
x
Reference in New Issue
Block a user