1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:17:23 +08:00

Update UserProfileOverlay and ClickableAvatar to treat system users more correctly

This commit is contained in:
Dean Herbert 2022-03-28 22:50:31 +09:00
parent d2d88015e3
commit dc7dc7f65a
2 changed files with 5 additions and 3 deletions

View File

@ -41,7 +41,7 @@ namespace osu.Game.Overlays
public void ShowUser(IUser user)
{
if (user == APIUser.SYSTEM_USER)
if (user.OnlineID == APIUser.SYSTEM_USER_ID)
return;
Show();

View File

@ -21,7 +21,7 @@ namespace osu.Game.Users.Drawables
/// </summary>
public bool OpenOnClick
{
set => clickableArea.Enabled.Value = value;
set => clickableArea.Enabled.Value = clickableArea.Action != null && value;
}
/// <summary>
@ -52,8 +52,10 @@ namespace osu.Game.Users.Drawables
Add(clickableArea = new ClickableArea
{
RelativeSizeAxes = Axes.Both,
Action = openProfile
});
if (user?.Id != APIUser.SYSTEM_USER_ID)
clickableArea.Action = openProfile;
}
[BackgroundDependencyLoader]