Revert "Merge pull request #50 from bexnoss/offline-mode"

This reverts commit b4f750e7db40352111417ea89a9f375ae8c746ab, reversing
changes made to b19e3156154ba0dd232a3d165b1759c57e2858f2.
This commit is contained in:
Lenny McLennington
2022-01-17 03:45:47 +00:00
parent f55297eca9
commit 55597b458c
17 changed files with 3 additions and 383 deletions

View File

@ -314,8 +314,6 @@ bool AccountData::resumeStateFromV3(QJsonObject data) {
type = AccountType::MSA;
} else if (typeS == "Mojang") {
type = AccountType::Mojang;
} else if (typeS == "Offline") {
type = AccountType::Offline;
} else {
qWarning() << "Failed to parse account data: type is not recognized.";
return false;
@ -365,9 +363,6 @@ QJsonObject AccountData::saveState() const {
tokenToJSONV3(output, xboxApiToken, "xrp-main");
tokenToJSONV3(output, mojangservicesToken, "xrp-mc");
}
else if (type == AccountType::Offline) {
output["type"] = "Offline";
}
tokenToJSONV3(output, yggdrasilToken, "ygg");
profileToJSONV3(output, minecraftProfile, "profile");
@ -376,7 +371,7 @@ QJsonObject AccountData::saveState() const {
}
QString AccountData::userName() const {
if(type == AccountType::MSA) {
if(type != AccountType::Mojang) {
return QString();
}
return yggdrasilToken.extra["userName"].toString();
@ -432,9 +427,6 @@ QString AccountData::accountDisplayString() const {
case AccountType::Mojang: {
return userName();
}
case AccountType::Offline: {
return userName();
}
case AccountType::MSA: {
if(xboxApiToken.extra.contains("gtg")) {
return xboxApiToken.extra["gtg"].toString();