mirror of
https://github.com/ppy/osu.git
synced 2025-03-05 13:13:22 +08:00
Fix stand alone chat display textbox not binding to local channel
This commit is contained in:
parent
c326745f96
commit
70dbb8edac
@ -87,14 +87,6 @@ namespace osu.Game.Online.Chat
|
||||
channelManager ??= manager;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
if (channelManager != null)
|
||||
TextBox?.Current.BindTo(channelManager.CurrentChannel.Value.TextBoxMessage);
|
||||
}
|
||||
|
||||
protected virtual StandAloneDrawableChannel CreateDrawableChannel(Channel channel) =>
|
||||
new StandAloneDrawableChannel(channel);
|
||||
|
||||
@ -119,8 +111,13 @@ namespace osu.Game.Online.Chat
|
||||
{
|
||||
drawableChannel?.Expire();
|
||||
|
||||
if (e.OldValue != null)
|
||||
TextBox?.Current.UnbindFrom(e.OldValue.TextBoxMessage);
|
||||
|
||||
if (e.NewValue == null) return;
|
||||
|
||||
TextBox?.Current.BindTo(e.NewValue.TextBoxMessage);
|
||||
|
||||
drawableChannel = CreateDrawableChannel(e.NewValue);
|
||||
drawableChannel.CreateChatLineAction = CreateMessage;
|
||||
drawableChannel.Padding = new MarginPadding { Bottom = postingTextBox ? text_box_height : 0 };
|
||||
|
Loading…
Reference in New Issue
Block a user