mirror of
https://github.com/ppy/osu
synced 2025-04-01 22:48:33 +00:00
Dont use binding to set disabled value
This commit is contained in:
parent
30d9b21b86
commit
092d16bb64
@ -61,6 +61,8 @@ namespace osu.Game.Overlays.Comments
|
|||||||
{
|
{
|
||||||
AccentColour = borderContainer.BorderColour = sideNumber.Colour = colours.GreenLight;
|
AccentColour = borderContainer.BorderColour = sideNumber.Colour = colours.GreenLight;
|
||||||
hoverLayer.Colour = Color4.Black.Opacity(0.5f);
|
hoverLayer.Colour = Color4.Black.Opacity(0.5f);
|
||||||
|
|
||||||
|
disabled = api.LocalUser.Value.Id == comment.UserId;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
@ -70,8 +72,6 @@ namespace osu.Game.Overlays.Comments
|
|||||||
votesCount.Value = comment.VotesCount;
|
votesCount.Value = comment.VotesCount;
|
||||||
isVoted.BindValueChanged(voted => background.Colour = voted.NewValue ? AccentColour : OsuColour.Gray(0.05f), true);
|
isVoted.BindValueChanged(voted => background.Colour = voted.NewValue ? AccentColour : OsuColour.Gray(0.05f), true);
|
||||||
votesCount.BindValueChanged(count => votesCounter.Text = $"+{count.NewValue}", true);
|
votesCount.BindValueChanged(count => votesCounter.Text = $"+{count.NewValue}", true);
|
||||||
|
|
||||||
api.LocalUser.BindValueChanged(user => disabled = user.NewValue?.Id == comment.UserId, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onAction()
|
private void onAction()
|
||||||
|
Loading…
Reference in New Issue
Block a user