mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 12:57:39 +09: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;
|
channelManager ??= manager;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
|
||||||
{
|
|
||||||
base.LoadComplete();
|
|
||||||
|
|
||||||
if (channelManager != null)
|
|
||||||
TextBox?.Current.BindTo(channelManager.CurrentChannel.Value.TextBoxMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected virtual StandAloneDrawableChannel CreateDrawableChannel(Channel channel) =>
|
protected virtual StandAloneDrawableChannel CreateDrawableChannel(Channel channel) =>
|
||||||
new StandAloneDrawableChannel(channel);
|
new StandAloneDrawableChannel(channel);
|
||||||
|
|
||||||
@ -119,8 +111,13 @@ namespace osu.Game.Online.Chat
|
|||||||
{
|
{
|
||||||
drawableChannel?.Expire();
|
drawableChannel?.Expire();
|
||||||
|
|
||||||
|
if (e.OldValue != null)
|
||||||
|
TextBox?.Current.UnbindFrom(e.OldValue.TextBoxMessage);
|
||||||
|
|
||||||
if (e.NewValue == null) return;
|
if (e.NewValue == null) return;
|
||||||
|
|
||||||
|
TextBox?.Current.BindTo(e.NewValue.TextBoxMessage);
|
||||||
|
|
||||||
drawableChannel = CreateDrawableChannel(e.NewValue);
|
drawableChannel = CreateDrawableChannel(e.NewValue);
|
||||||
drawableChannel.CreateChatLineAction = CreateMessage;
|
drawableChannel.CreateChatLineAction = CreateMessage;
|
||||||
drawableChannel.Padding = new MarginPadding { Bottom = postingTextBox ? text_box_height : 0 };
|
drawableChannel.Padding = new MarginPadding { Bottom = postingTextBox ? text_box_height : 0 };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user