1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 04:07:25 +08:00

Merge pull request #13428 from peppy/fix-pm-tab-avatars

Fix avatars missing in private message channel tabs / local leaderboards
This commit is contained in:
Dan Balasescu 2021-06-10 18:34:23 +09:00 committed by GitHub
commit 1505534c7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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");
}