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:
parent
8d927920cb
commit
1262e76a58
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user