1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Remove IAPIProvider since its not required at DrawableAvatar

This commit is contained in:
ilsubyeega 2021-03-29 20:05:24 +09:00
parent b3d3c7ecac
commit dc3af1e0f7

View File

@ -5,7 +5,6 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Game.Online.API;
namespace osu.Game.Users.Drawables
{
@ -14,9 +13,6 @@ namespace osu.Game.Users.Drawables
{
private readonly User user;
[Resolved(CanBeNull = true)]
private IAPIProvider api { get; set; }
/// <summary>
/// A simple, non-interactable avatar sprite for the specified user.
/// </summary>
@ -35,7 +31,7 @@ namespace osu.Game.Users.Drawables
private void load(LargeTextureStore textures)
{
string avatarUrl = user?.AvatarUrl;
if (api != null && avatarUrl != null)
if (avatarUrl != null)
Texture = textures.Get(avatarUrl);
else if (user != null && user.Id > 1)
Texture = textures.Get($@"https://a.ppy.sh/{user.Id}");