Retooled achievement badge fetch process

This change was primarily made to refactor the badge fetching to use the client instead of the runtime, but in the process I also refactored the code to cut down on complexity and duplication. Now the FetchBadge method is passed a function that generates the badge name; this is used to ensure that once the badge is loaded that it is still the desired badge to avoid race conditions.
This commit is contained in:
LillyJadeKatrin
2024-03-30 10:51:18 -04:00
parent 7b835a20ca
commit c5bb1c4e68
3 changed files with 110 additions and 269 deletions

View File

@ -302,7 +302,8 @@ void AchievementSettingsWidget::ToggleProgress()
void AchievementSettingsWidget::ToggleBadges()
{
SaveSettings();
AchievementManager::GetInstance().FetchBadges();
AchievementManager::GetInstance().FetchPlayerBadge();
AchievementManager::GetInstance().FetchGameBadges();
}
void AchievementSettingsWidget::ToggleUnofficial()