Simplify text clear and placeholder change in ChatTextBox

This commit is contained in:
Jai Sharma 2022-04-02 17:14:27 +01:00
parent fff30e8a6e
commit b9421d1415

View File

@ -20,8 +20,10 @@ namespace osu.Game.Overlays.Chat
ShowSearch.BindValueChanged(change =>
{
PlaceholderText = change.NewValue ? "type here to search" : "type here";
Schedule(() => Text = string.Empty);
bool showSearch = change.NewValue;
PlaceholderText = showSearch ? "type here to search" : "type here";
Text = string.Empty;
}, true);
}