mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Reduce initial channel load overhead by only loading history on active channel
This commit is contained in:
@ -93,6 +93,12 @@ namespace osu.Game.Online.Chat
|
||||
{
|
||||
if (!(e.NewValue is ChannelSelectorTabItem.ChannelSelectorTabChannel))
|
||||
JoinChannel(e.NewValue);
|
||||
|
||||
if (e.NewValue?.MessagesLoaded == false)
|
||||
{
|
||||
// let's fetch a small number of messages to bring us up-to-date with the backlog.
|
||||
fetchInitalMessages(e.NewValue);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -375,12 +381,6 @@ namespace osu.Game.Online.Chat
|
||||
if (CurrentChannel.Value == null)
|
||||
CurrentChannel.Value = channel;
|
||||
|
||||
if (!channel.MessagesLoaded)
|
||||
{
|
||||
// let's fetch a small number of messages to bring us up-to-date with the backlog.
|
||||
fetchInitalMessages(channel);
|
||||
}
|
||||
|
||||
return channel;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user