Reword instance-specific account settings, apply clang-format

Signed-off-by: Aaron <10217842+byteduck@users.noreply.github.com>
This commit is contained in:
Aaron
2023-01-02 11:16:09 -07:00
parent eefb259ddf
commit ba81ad1ac3
3 changed files with 19 additions and 30 deletions

View File

@ -115,16 +115,12 @@ void LaunchController::decideAccount()
// Select the account to use. If the instance has a specific account set, that will be used. Otherwise, the default account will be used
auto instanceAccountId = m_instance->settings()->get("InstanceAccountId").toString();
auto instanceAccountIndex = accounts->findAccountByProfileId(instanceAccountId);
if (instanceAccountIndex == -1)
{
if (instanceAccountIndex == -1) {
m_accountToUse = accounts->defaultAccount();
}
else
{
} else {
m_accountToUse = accounts->at(instanceAccountIndex);
}
if (!m_accountToUse)
{
// If no default account is set, ask the user which one to use.