1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-18 23:57:22 +08:00

Merge pull request #10759 from Joehuu/disable-watching-yourself

This commit is contained in:
Dean Herbert 2020-11-10 13:10:54 +09:00 committed by GitHub
commit 582b5454ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,7 +110,11 @@ namespace osu.Game.Overlays.Dashboard
User = user;
AutoSizeAxes = Axes.Both;
}
[BackgroundDependencyLoader]
private void load(IAPIProvider api)
{
InternalChildren = new Drawable[]
{
new FillFlowContainer
@ -121,7 +125,7 @@ namespace osu.Game.Overlays.Dashboard
Width = 290,
Children = new Drawable[]
{
new UserGridPanel(user)
new UserGridPanel(User)
{
RelativeSizeAxes = Axes.X,
Anchor = Anchor.TopCentre,
@ -133,7 +137,8 @@ namespace osu.Game.Overlays.Dashboard
Text = "Watch",
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Action = () => game?.PerformFromScreen(s => s.Push(new Spectator(user)))
Action = () => game?.PerformFromScreen(s => s.Push(new Spectator(User))),
Enabled = { Value = User.Id != api.LocalUser.Value.Id }
}
}
},