Dont use binding to set disabled value

This commit is contained in:
Andrei Zavatski 2019-10-29 23:43:16 +03:00
parent 30d9b21b86
commit 092d16bb64
1 changed files with 2 additions and 2 deletions

View File

@ -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()