Skip to content

Commit

Permalink
Fixed localization stuff
Browse files Browse the repository at this point in the history
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
  • Loading branch information
Trial97 committed Nov 23, 2023
1 parent 2268e46 commit 9345416
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 2 additions & 3 deletions launcher/LaunchController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include "ui/InstanceWindow.h"
#include "ui/MainWindow.h"
#include "ui/dialogs/CustomMessageBox.h"
#include "ui/dialogs/EditAccountDialog.h"
#include "ui/dialogs/MSALoginDialog.h"
#include "ui/dialogs/ProfileSelectDialog.h"
#include "ui/dialogs/ProfileSetupDialog.h"
Expand Down Expand Up @@ -145,7 +144,7 @@ void LaunchController::login()
bool tryagain = true;
unsigned int tries = 0;

if (!m_accountToUse->isOffline() && m_accountToUse->accountState() == AccountState::Offline) {
if (m_accountToUse->accountType() != AccountType::Offline && m_accountToUse->accountState() == AccountState::Offline) {
// 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();
Expand Down Expand Up @@ -293,7 +292,7 @@ bool LaunchController::reauthenticateCurrentAccount()
auto accounts = APPLICATION->accounts();
bool isDefault = accounts->defaultAccount() == m_accountToUse;
accounts->removeAccount(accounts->index(accounts->findAccountByProfileId(m_accountToUse->profileId())));
if (m_accountToUse->isMSA()) {
if (m_accountToUse->accountType() == AccountType::MSA) {
auto newAccount =
MSALoginDialog::newAccount(m_parentWidget, tr("Please enter your Mojang account email and password to add your account."));
accounts->addAccount(newAccount);
Expand Down
2 changes: 0 additions & 2 deletions launcher/minecraft/auth/AccountList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@
#include <FileSystem.h>
#include <QSaveFile>

#include <chrono>

enum AccountListVersion { MojangMSA = 3 };

AccountList::AccountList(QObject* parent) : QAbstractListModel(parent)
Expand Down

0 comments on commit 9345416

Please sign in to comment.