1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-14 21:13:21 +08:00

Fix avatars missing in private message channel tabs / local leaderboards

Regressed in https://github.com/ppy/osu/pull/12204.

Adding this back in a central location for now, as each of the remaining cases will
need a local solution.
This commit is contained in:
Dean Herbert 2021-06-10 17:39:36 +09:00
parent 62b400fea5
commit 6a40ef581c

View File

@ -31,7 +31,9 @@ namespace osu.Game.Users.Drawables
private void load(LargeTextureStore textures)
{
if (user != null && user.Id > 1)
Texture = textures.Get(user.AvatarUrl);
// TODO: The fallback here should not need to exist. Users should be looked up and populated via UserLookupCache or otherwise
// in remaining cases where this is required (chat tabs, local leaderboard), at which point this should be removed.
Texture = textures.Get(user.AvatarUrl ?? $@"https://a.ppy.sh/{user.Id}");
Texture ??= textures.Get(@"Online/avatar-guest");
}