1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 12:53:11 +08:00

Rewrite conditional to be more 'balanced'

This commit is contained in:
Jamie Taylor 2021-09-10 12:25:41 +09:00
parent b01cf5c937
commit 2838a3a961
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C

View File

@ -69,20 +69,22 @@ namespace osu.Game.Users.Drawables
if (user == null && !showGuestOnNull) if (user == null && !showGuestOnNull)
return null; return null;
if (!openOnClick) if (openOnClick)
{
return new ClickableAvatar(user)
{
OpenOnClick = true,
ShowUsernameTooltip = showUsernameTooltip,
RelativeSizeAxes = Axes.Both,
};
}
else
{ {
return new DrawableAvatar(user) return new DrawableAvatar(user)
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
}; };
} }
return new ClickableAvatar(user)
{
OpenOnClick = openOnClick,
ShowUsernameTooltip = showUsernameTooltip,
RelativeSizeAxes = Axes.Both,
};
} }
} }
} }