mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Finding peace with the UI thread.
There is the issue that in some cases that the ui thread blocked.
This commit is contained in:
@ -49,7 +49,9 @@ namespace osu.Game.Overlays.Chat
|
||||
|
||||
public void AddItem(Channel channel)
|
||||
{
|
||||
if (!ChannelTabControl.Items.Contains(channel))
|
||||
ChannelTabControl.AddItem(channel);
|
||||
|
||||
if (Current.Value == null)
|
||||
Current.Value = channel;
|
||||
}
|
||||
|
@ -55,15 +55,11 @@ namespace osu.Game.Overlays.Chat
|
||||
Channel.PendingMessageResolved += pendingMessageResolved;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
newMessagesArrived(Channel.Messages);
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
newMessagesArrived(Channel.Messages);
|
||||
scrollToEnd();
|
||||
}
|
||||
|
||||
|
@ -124,6 +124,8 @@ namespace osu.Game.Overlays.Chat.Selection
|
||||
}
|
||||
|
||||
public void UpdateAvailableChannels(IEnumerable<Channel> channels)
|
||||
{
|
||||
Scheduler.Add(() =>
|
||||
{
|
||||
sectionsFlow.ChildrenEnumerable = new[]
|
||||
{
|
||||
@ -142,6 +144,7 @@ namespace osu.Game.Overlays.Chat.Selection
|
||||
c.OnRequestLeave = channel => { OnRequestLeave?.Invoke(channel); };
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
Reference in New Issue
Block a user