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