1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:20:04 +08:00

Set chat text box message length limit based on channel

This commit is contained in:
Bartłomiej Dach 2023-07-09 21:42:13 +02:00
parent 2af8c7bc24
commit 6453ab6049
No known key found for this signature in database

View File

@ -156,7 +156,11 @@ namespace osu.Game.Overlays.Chat
chatTextBox.Current.UnbindFrom(change.OldValue.TextBoxMessage); chatTextBox.Current.UnbindFrom(change.OldValue.TextBoxMessage);
if (newChannel != null) if (newChannel != null)
{
// change length limit first before binding to avoid accidentally truncating pending message from new channel.
chatTextBox.LengthLimit = newChannel.MessageLengthLimit;
chatTextBox.Current.BindTo(newChannel.TextBoxMessage); chatTextBox.Current.BindTo(newChannel.TextBoxMessage);
}
}, true); }, true);
} }