Fix potential multiple submission

This commit is contained in:
smoogipoo 2020-12-18 17:48:42 +09:00
parent 2958cab239
commit 1369b75a86

View File

@ -502,6 +502,7 @@ namespace osu.Game.Screens.Play
} }
private ScheduledDelegate completionProgressDelegate; private ScheduledDelegate completionProgressDelegate;
private Task<ScoreInfo> scoreSubmissionTask;
private void updateCompletionState(ValueChangedEvent<bool> completionState) private void updateCompletionState(ValueChangedEvent<bool> completionState)
{ {
@ -528,7 +529,8 @@ namespace osu.Game.Screens.Play
if (!showResults) return; if (!showResults) return;
SubmitScore(CreateScore()).ContinueWith(t => Schedule(() => scoreSubmissionTask ??= SubmitScore(CreateScore());
scoreSubmissionTask.ContinueWith(t => Schedule(() =>
{ {
using (BeginDelayedSequence(RESULTS_DISPLAY_DELAY)) using (BeginDelayedSequence(RESULTS_DISPLAY_DELAY))
{ {