diff --git a/launcher/src/account.cpp b/launcher/src/account.cpp index 34c6a16..8d86368 100644 --- a/launcher/src/account.cpp +++ b/launcher/src/account.cpp @@ -321,7 +321,7 @@ QCoro::Task Account::getKeychainValue(const QString &key) co_await qCoro(job, &QKeychain::ReadPasswordJob::finished); if (job->error() != QKeychain::NoError) { - qWarning(ASTRA_LOG) << "Error when reading" << key << job->errorString(); + qWarning(ASTRA_LOG) << "Error when reading" << key << job->errorString() << "for account" << uuid(); } co_return job->textData(); diff --git a/launcher/ui/Pages/LoginPage.qml b/launcher/ui/Pages/LoginPage.qml index 83cef58..bc61c4d 100644 --- a/launcher/ui/Pages/LoginPage.qml +++ b/launcher/ui/Pages/LoginPage.qml @@ -57,14 +57,11 @@ QQC2.Control { return false; } - if (LauncherCore.currentProfile.loggedIn) { - return false; - } - - return true; + return !LauncherCore.currentProfile.loggedIn; } function updateFields() { + console.info(!LauncherCore.currentProfile.account.needsPassword && LauncherCore.currentProfile.account.rememberPassword); usernameField.text = LauncherCore.currentProfile.account.name; passwordField.text = !LauncherCore.currentProfile.account.needsPassword && LauncherCore.currentProfile.account.rememberPassword ? LauncherCore.currentProfile.account.getPassword() : ""; otpField.text = ""; @@ -99,6 +96,8 @@ QQC2.Control { } } + Component.onCompleted: updateFields() + contentItem: ColumnLayout { width: parent.width @@ -236,7 +235,6 @@ QQC2.Control { id: passwordField label: LauncherCore.currentProfile.account.isSapphire ? i18n("Password") : i18n("Square Enix Password") echoMode: TextInput.Password - enabled: LauncherCore.currentProfile.account.rememberPassword ? LauncherCore.currentProfile.account.needsPassword : true focus: true onAccepted: { if (otpField.visible) { @@ -245,7 +243,6 @@ QQC2.Control { loginButton.clicked(); } } - text: (!LauncherCore.currentProfile.account.needsPassword && LauncherCore.currentProfile.account.rememberPassword) ? LauncherCore.currentProfile.account.getPassword() : "" } FormCard.FormDelegateSeparator {