mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 05:02:55 +08:00
Fix order of execution when populating initial messages.
This commit is contained in:
parent
de87141e90
commit
c6fa5cc803
@ -22,8 +22,6 @@ namespace osu.Game.Online.Chat.Drawables
|
||||
public DrawableChannel(Channel channel)
|
||||
{
|
||||
this.channel = channel;
|
||||
newMessagesArrived(channel.Messages);
|
||||
channel.NewMessagesArrived += newMessagesArrived;
|
||||
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
|
||||
@ -52,6 +50,9 @@ namespace osu.Game.Online.Chat.Drawables
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
channel.NewMessagesArrived += newMessagesArrived;
|
||||
newMessagesArrived(channel.Messages);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
@ -60,12 +61,6 @@ namespace osu.Game.Online.Chat.Drawables
|
||||
channel.NewMessagesArrived -= newMessagesArrived;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
newMessagesArrived(channel.Messages);
|
||||
}
|
||||
|
||||
private void newMessagesArrived(IEnumerable<Message> newMessages)
|
||||
{
|
||||
if (!IsLoaded) return;
|
||||
|
Loading…
Reference in New Issue
Block a user