Merge pull request #2571 from Trial97/account_refresh

refresh account if it should refresh on instance launch
This commit is contained in:
Alexandru Ionut Tripon 2024-06-28 20:38:05 +03:00 committed by GitHub
commit 4aa2e5b85d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -194,7 +194,8 @@ void LaunchController::login()
bool tryagain = true;
unsigned int tries = 0;
if (m_accountToUse->accountType() != AccountType::Offline && m_accountToUse->accountState() == AccountState::Offline) {
if ((m_accountToUse->accountType() != AccountType::Offline && m_accountToUse->accountState() == AccountState::Offline) ||
m_accountToUse->shouldRefresh()) {
// Force account refresh on the account used to launch the instance updating the AccountState
// only on first try and if it is not meant to be offline
auto accounts = APPLICATION->accounts();