mirror of https://github.com/ppy/osu
Update `ChannelManager.CurrentChannel` directly to handle non-loaded chat scenario
`currentChannel` gets instantiated once the chat overlay is open, while `HighlightMessage` could be called while the chat overlay has never been open. This will all be rewritten with the new chat overlay design anyways, so should be fine for now.
This commit is contained in:
parent
f8e5570e41
commit
f645869958
|
@ -309,10 +309,10 @@ private void currentChannelChanged(ValueChangedEvent<Channel> e)
|
|||
/// <param name="message">The message to highlight.</param>
|
||||
public void HighlightMessage(Message message)
|
||||
{
|
||||
if (currentChannel.Value.Id != message.ChannelId)
|
||||
currentChannel.Value = channelManager.JoinedChannels.Single(c => c.Id == message.ChannelId);
|
||||
if (channelManager.CurrentChannel.Value.Id != message.ChannelId)
|
||||
channelManager.CurrentChannel.Value = channelManager.JoinedChannels.Single(c => c.Id == message.ChannelId);
|
||||
|
||||
currentChannel.Value.HighlightedMessage.Value = message;
|
||||
channelManager.CurrentChannel.Value.HighlightedMessage.Value = message;
|
||||
}
|
||||
|
||||
private float startDragChatHeight;
|
||||
|
|
Loading…
Reference in New Issue