Ensure ChannelManager has access to API from point of construction

Closes https://github.com/ppy/osu/issues/18451.
This commit is contained in:
Dean Herbert
2022-06-08 18:54:23 +09:00
parent 4df8219c8f
commit c661f2b059
8 changed files with 27 additions and 19 deletions

View File

@ -5,6 +5,7 @@ using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Online.API;
using osu.Game.Online.Chat;
using osu.Game.Overlays.Chat;
using osu.Game.Tournament.IPC;
@ -29,7 +30,7 @@ namespace osu.Game.Tournament.Components
}
[BackgroundDependencyLoader(true)]
private void load(MatchIPCInfo ipc)
private void load(MatchIPCInfo ipc, IAPIProvider api)
{
if (ipc != null)
{
@ -45,7 +46,7 @@ namespace osu.Game.Tournament.Components
if (manager == null)
{
AddInternal(manager = new ChannelManager { HighPollRate = { Value = true } });
AddInternal(manager = new ChannelManager(api) { HighPollRate = { Value = true } });
Channel.BindTo(manager.CurrentChannel);
}