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:
parent
d2d88015e3
commit
dc7dc7f65a
@ -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();
|
||||
|
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user