Merge pull request #1751 from LocalSpook/account_type

This commit is contained in:
Sefa Eyeoglu 2023-11-23 10:27:06 +01:00 committed by GitHub
commit d60d089cbc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 9 deletions

View file

@ -35,6 +35,7 @@
*/
#include "AccountListPage.h"
#include "minecraft/auth/AccountData.h"
#include "ui_AccountListPage.h"
#include <QItemSelectionModel>
@ -216,7 +217,7 @@ void AccountListPage::updateButtonStates()
QModelIndex selected = selection.first();
MinecraftAccountPtr account = selected.data(AccountList::PointerRole).value<MinecraftAccountPtr>();
accountIsReady = !account->isActive();
accountIsOnline = !account->isOffline();
accountIsOnline = account->accountType() != AccountType::Offline;
}
ui->actionRemove->setEnabled(accountIsReady);
ui->actionSetDefault->setEnabled(accountIsReady);