From f7dde53f9b11afc256c0bb6103be4904ff0a84df Mon Sep 17 00:00:00 2001 From: Liam DeVoe Date: Mon, 19 Jun 2023 18:20:16 -0400 Subject: [PATCH] use runOnceImmediately instead of duplicating logic --- osu.Game/Overlays/Comments/CommentEditor.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/osu.Game/Overlays/Comments/CommentEditor.cs b/osu.Game/Overlays/Comments/CommentEditor.cs index 58fba4bb57..b139fbefe6 100644 --- a/osu.Game/Overlays/Comments/CommentEditor.cs +++ b/osu.Game/Overlays/Comments/CommentEditor.cs @@ -88,9 +88,7 @@ namespace osu.Game.Overlays.Comments { Height = 40, RelativeSizeAxes = Axes.X, - PlaceholderText = GetTextBoxPlaceholder(API.IsLoggedIn), - Current = Current, - ReadOnly = !API.IsLoggedIn + Current = Current }, new Container { @@ -126,7 +124,6 @@ namespace osu.Game.Overlays.Comments Spacing = new Vector2(5, 0), Child = commitButton = new EditorButton { - Text = GetCommitButtonText(API.IsLoggedIn), Action = () => commitOrLogIn(Current.Value) } }, @@ -152,7 +149,7 @@ namespace osu.Game.Overlays.Comments { base.LoadComplete(); Current.BindValueChanged(_ => updateCommitButtonState(), true); - User.BindValueChanged(_ => updateStateForLoggedIn()); + User.BindValueChanged(_ => updateStateForLoggedIn(), true); } protected abstract void OnCommit(string text);