mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09:00
Fix ready-up button getting stuck if server operation fails
This commit is contained in:
parent
274730de34
commit
cafa241ef3
@ -11,7 +11,6 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Extensions;
|
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Screens.OnlinePlay.Components;
|
using osu.Game.Screens.OnlinePlay.Components;
|
||||||
@ -218,13 +217,14 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
.ContinueWith(t =>
|
.ContinueWith(t =>
|
||||||
{
|
{
|
||||||
// if gameplay was started, the button will be unblocked on load requested.
|
// if gameplay was started, the button will be unblocked on load requested.
|
||||||
if (t.Result) return;
|
// accessing Exception here also silences any potential errors from the antecedent task
|
||||||
|
// (we still want to unblock the button if the ready-up fails).
|
||||||
|
if (t.Exception == null && t.Result) return;
|
||||||
|
|
||||||
// gameplay was not started; unblock button.
|
// gameplay was not started; unblock button.
|
||||||
gameplayStartOperation?.Dispose();
|
gameplayStartOperation?.Dispose();
|
||||||
gameplayStartOperation = null;
|
gameplayStartOperation = null;
|
||||||
})
|
});
|
||||||
.CatchUnobservedExceptions();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onLoadRequested()
|
private void onLoadRequested()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user