mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 22:27:25 +08:00
Fix initial multiplayer poll
This commit is contained in:
parent
6a46105b5e
commit
1bae7173d3
@ -28,7 +28,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
private MultiplayerListingPollingComponent listingPollingComponent;
|
private MultiplayerListingPollingComponent listingPollingComponent;
|
||||||
|
|
||||||
private readonly IBindable<bool> isConnected = new Bindable<bool>();
|
private readonly IBindable<bool> isConnected = new Bindable<bool>();
|
||||||
private readonly Bindable<bool> allowPolling = new Bindable<bool>();
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
@ -36,6 +35,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
|
|
||||||
isConnected.BindTo(client.IsConnected);
|
isConnected.BindTo(client.IsConnected);
|
||||||
isConnected.BindValueChanged(c => Scheduler.AddOnce(() => listingPollingComponent.AllowPolling = c.NewValue));
|
isConnected.BindValueChanged(c => Scheduler.AddOnce(() => listingPollingComponent.AllowPolling = c.NewValue));
|
||||||
|
listingPollingComponent.AllowPolling = isConnected.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnResuming(IScreen last)
|
public override void OnResuming(IScreen last)
|
||||||
|
Loading…
Reference in New Issue
Block a user