mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Fix order of execution when populating initial messages.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user