Remove synchronous achievement login

Deletes AchievementManager::Login, renames LoginAsync to Login, and replaces the one synchronous call in the AchievementSettingsWidget with the async call. There is a minor usability regression in that the UI currently does not notify the user when a login has failed; this will be addressed in a later change (possibly in a different PR).
This commit is contained in:
LillyJadeKatrin
2024-03-18 16:33:37 -04:00
parent ba519e4670
commit 7b3fac18cd
3 changed files with 5 additions and 22 deletions

View File

@ -254,9 +254,9 @@ void AchievementSettingsWidget::ToggleRAIntegration()
void AchievementSettingsWidget::Login()
{
Config::SetBaseOrCurrent(Config::RA_USERNAME, m_common_username_input->text().toStdString());
AchievementManager::GetInstance().Login(m_common_password_input->text().toStdString());
AchievementManager::GetInstance().Login(m_common_password_input->text().toStdString(),
[](AchievementManager::ResponseType r_type) {});
m_common_password_input->setText(QString());
m_common_login_failed->setVisible(Config::Get(Config::RA_API_TOKEN).empty());
SaveSettings();
}