From b9421d1415af7e15c07b3f7237603170ea4a7a92 Mon Sep 17 00:00:00 2001 From: Jai Sharma Date: Sat, 2 Apr 2022 17:14:27 +0100 Subject: [PATCH] Simplify text clear and placeholder change in `ChatTextBox` --- osu.Game/Overlays/Chat/ChatTextBox.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Chat/ChatTextBox.cs b/osu.Game/Overlays/Chat/ChatTextBox.cs index 35ed26cda3..e0f949caba 100644 --- a/osu.Game/Overlays/Chat/ChatTextBox.cs +++ b/osu.Game/Overlays/Chat/ChatTextBox.cs @@ -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); }