1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:33:20 +08:00

Fix test failure due to missing DI cached IdleTracker

This commit is contained in:
Dean Herbert 2021-12-31 23:18:03 +09:00
parent 8d927920cb
commit 1262e76a58

View File

@ -68,20 +68,21 @@ namespace osu.Game.Online.Chat
public readonly BindableBool HighPollRate = new BindableBool();
private IBindable<bool> isIdle;
private readonly IBindable<bool> isIdle = new BindableBool();
public ChannelManager()
{
CurrentChannel.ValueChanged += currentChannelChanged;
}
[BackgroundDependencyLoader]
[BackgroundDependencyLoader(permitNulls: true)]
private void load(IdleTracker idleTracker)
{
HighPollRate.BindValueChanged(updatePollRate);
isIdle = idleTracker.IsIdle.GetBoundCopy();
isIdle.BindValueChanged(updatePollRate, true);
if (idleTracker != null)
isIdle.BindTo(idleTracker.IsIdle);
}
private void updatePollRate(ValueChangedEvent<bool> valueChangedEvent)