Remove Leaderboard Fetch when Getting Info

The cause of the leaderboard spam was primarily this call where if there was an attempt to get leaderboard info and there wasn't already, there would be a fetch request. This is bad for many reasons: some games have hundreds of boards that will be fetched at startup, if there's simply no data to populate that board, this will just continue to fetch every time the dialog needs to update. To mitigate this, I simply don't load leaderboard information until there are events for that leaderboard - less information for the player, sadly, but heavily cuts down on the number of leaderboard fetches.
This commit is contained in:
LillyJadeKatrin 2024-07-17 22:51:24 -04:00
parent cc3ff347b4
commit e7504d0b12

View file

@ -479,8 +479,6 @@ AchievementManager::GetLeaderboardInfo(AchievementManager::AchievementId leaderb
if (const auto leaderboard_iter = m_leaderboard_map.find(leaderboard_id);
leaderboard_iter != m_leaderboard_map.end())
{
if (leaderboard_iter->second.entries.size() == 0)
FetchBoardInfo(leaderboard_id);
return &leaderboard_iter->second;
}