Rewrite logic slightly to better convey meaning of textbox clear

This commit is contained in:
Bartłomiej Dach 2022-04-03 14:23:45 +02:00
parent 94fa5e2ef2
commit 970b1951ac
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497
1 changed files with 3 additions and 2 deletions

View File

@ -153,9 +153,10 @@ private void chatTextBoxChange(ValueChangedEvent<string> change)
private void chatTextBoxCommit(TextBox sender, bool newText)
{
if (!ShowSearch.Value)
OnChatMessageCommitted?.Invoke(sender.Text);
if (ShowSearch.Value)
return;
OnChatMessageCommitted?.Invoke(sender.Text);
sender.Text = string.Empty;
}
}