1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 16:32:54 +08:00

Simply code under assuming that avatarUrl always non-null

This commit is contained in:
ilsubyeega 2021-03-30 17:03:01 +09:00
parent dc3af1e0f7
commit 0c1f624b56

View File

@ -30,11 +30,8 @@ namespace osu.Game.Users.Drawables
[BackgroundDependencyLoader]
private void load(LargeTextureStore textures)
{
string avatarUrl = user?.AvatarUrl;
if (avatarUrl != null)
Texture = textures.Get(avatarUrl);
else if (user != null && user.Id > 1)
Texture = textures.Get($@"https://a.ppy.sh/{user.Id}");
if (user != null && user.Id > 1)
Texture = textures.Get(user.AvatarUrl);
Texture ??= textures.Get(@"Online/avatar-guest");
}